Showing posts with label connect. Show all posts
Showing posts with label connect. Show all posts

Thursday, March 22, 2012

AdventureWorks, invalid object name error

Hi, I will start step by step:

1. a new web site with VS 2005.

2. I added a sqldatasouce and connect with AdventureWorks sample database ,which comes with sql server 2005 developer edition, selected by drop-down list. [ server name:(local) ]

3. Test connection. It is OK.

4. Saved as 'AdventureWorksConnectionString'.

5. Some columns are selected in the 'product' table.

6. At the end while testing query with 'test query' button it gives:

"There was an error executing the query. Please check the syntax of the command and if present, the types and values of parameters and ensure the are correct.

Invalid object name 'Product'. "

7. However when I choice NorthWind database sample I installed externally, there is no problem.Moreover, when I choice AWBuildVersion table in the AdventureWorks, and it's columns, there is also no problem.

8. I compared NorthWind and AdventureWorks security properties in the SQL server managment studio, but can't find any differences.

9. I have been searching all the web since two days.

10. Thanks.

can you paste the SQL command that fails...

|||

There are two problems.

The AdventureWorks database uses a "Schema.Table" naming convention that the SQLDataSource Wizard doesn't pickup.

Table Names are Case-Sensitive in the AdventureWorks database.

Workaround:

Instead of "Specify columns from table or view", select "Specify a custom SQL statement..."

On the next screen, use the "Query Builder" to generate the SQL statement. It will pickup the schema name.

PS: After I post this message, I'm going to move this thread to the SQL database forum. I think it's more appropriate there.

|||

Yeah, it works... Thank you very much... But,I couldn't figure out why this happened to me, because I have started to read"Addison Wesley ASP NET .2.0 Illustrated". In that book, it is theprocedure how to implement AdventureWorks database in Chapter 2, and does normention any info of "Schema.Table" and SQLDataSouce relation. Ihave tried some method to accomplish that with "Specify columns from tableor view" method:

Source Code of"Specify columns from table or view" method which gives error:

<asp:SqlDataSource ID="SqlDataSource3" runat="server"ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString%>"
ProviderName="<%$ConnectionStrings:AdventureWorksConnectionString.ProviderName %>"
SelectCommand="SELECT [ProductID], [Name], [ProductNumber], [ListPrice],[Color], [SafetyStockLevel], [StandardCost], [Size] FROM[Product]">
</asp:SqlDataSource>


Source Code of "Specify a custom SQL statement..."and applying "Query Builder" method which gives NO error:

<asp:SqlDataSource ID="SqlDataSource3" runat="server"ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString%>"
SelectCommand="SELECT ProductID, Name, ProductNumber, ListPrice, Color,SafetyStockLevel, StandardCost, Size FROMProduction.Product">
</asp:SqlDataSource>

What I could try as a beginner to get a validoutput is changing[Product] as Production.Product.Of course, it gives the same 'invalid object name' error.

As I told you before, AWBuildVersion tablegives no error with "Specify columns from table or view" method:

<asp:SqlDataSource ID="SqlDataSource3" runat="server"ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString%>"
ProviderName="<%$ ConnectionStrings:AdventureWorksConnectionString.ProviderName%>"
SelectCommand="SELECT [SystemInformationID], [Database Version] ASDatabase_Version, [VersionDate], [ModifiedDate] FROM [AWBuildVersion]">
</asp:SqlDataSource>

I have understood from your note theonly way to implement "Schema.Table" s is use the "QueryBuilder", right?

And for your consideration here is Stack Trace:
------
SqlException (0x80131904): Invalid object name 'Product'.]

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +177

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +68

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199

System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2406

System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31

System.Data.SqlClient.SqlDataReader.get_MetaData() +62

System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +294

System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1038

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +314

System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +20

System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +107

System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +10

System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +7

System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +140

System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83

System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1657

System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +13

System.Web.UI.WebControls.DataBoundControl.PerformSelect() +140

System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +68

System.Web.UI.WebControls.GridView.DataBind() +5

System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +61

System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +67

System.Web.UI.Control.EnsureChildControls() +97

System.Web.UI.Control.PreRenderRecursiveInternal() +50

System.Web.UI.Control.PreRenderRecursiveInternal() +171

System.Web.UI.Control.PreRenderRecursiveInternal() +171

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5731

------
 Again, Thank you very much to help and save my time.

sql

Tuesday, March 20, 2012

Adventure works database, I can't connect to the database

Database not found !

My web.config file has this bit of code:

<connectionStrings>

<add name="AppConnectionString1" connectionString="Data Source=&quot;.\SQLEXPRESS&quot;;AttachDbFilename=&quot;C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf&quot;;Integrated Security=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

But........................... the is no "AdventureWorks_Data.mdf" in that folder ?

And the database is installed in the right place !

help !

Where is the AdventureWorks_Data.mdf file located? AttachDbFilename must point to the location of the mdf file. It sounds like you have the wrong connection string. If you're not putting the database into the Data folder, then you need to change your connection string to point to the correct location.

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

|||

Did this resolve the issue?

Mike

|||

Hmmm

I've downloaded and installed the Adventure works database

I follow the instructions give here

http://msdn2.microsoft.com/en-us/library/ms310325.aspx

but this command here:

exec sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @.filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'

results in this error:

unable to open physical file,................................................. the system can't find the specified file.

The things is....................... i can't find a "AdventureWorks_Data.mdf" file.

|||

When you downloaded and installed the AdventureWorks sample, you were probably asked for a directory to install to, that's where the database should be. If you don't recall where it went, try searching your hard drive for it. (Start | Search and then look for "AdventrueWorks*")

Once you know where it is, you can either change the path in the command above, or you can move it to the Data directory for the instanse of SQL that you want to attach it to. If search doesn't find the file, that probably means it either didn't get installed, or it was deleted. Try installing again. You may have to uninstall the sample from Add/Remove Programs before you can install it again.

Mike

|||

I basically have the same problem; however, I do have the: AdventureWorks_Data.mdf and AdventureWorks_log.ldf files in the proper directory. But I do a 'search' and do not see the 'AdventureWorks' db file.

I run the script:

exec sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @.filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'

and get:

Msg 1813, Level 16, State 2, Line 1

Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted.

Msg 602, Level 21, State 50, Line 1

Could not find row in sysindexes for database ID 9, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.

Thanks for any help in advance...

Adventure works database, I can't connect to the database

Database not found !

My web.config file has this bit of code:

<connectionStrings>

<add name="AppConnectionString1" connectionString="Data Source=&quot;.\SQLEXPRESS&quot;;AttachDbFilename=&quot;C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf&quot;;Integrated Security=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

But........................... the is no "AdventureWorks_Data.mdf" in that folder ?

And the database is installed in the right place !

help !

Where is the AdventureWorks_Data.mdf file located? AttachDbFilename must point to the location of the mdf file. It sounds like you have the wrong connection string. If you're not putting the database into the Data folder, then you need to change your connection string to point to the correct location.

Regards,

Mike Wachal
SQL Express team

-
Mark the best posts as Answers!

|||

Did this resolve the issue?

Mike

|||

Hmmm

I've downloaded and installed the Adventure works database

I follow the instructions give here

http://msdn2.microsoft.com/en-us/library/ms310325.aspx

but this command here:

exec sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @.filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'

results in this error:

unable to open physical file,................................................. the system can't find the specified file.

The things is....................... i can't find a "AdventureWorks_Data.mdf" file.

|||

When you downloaded and installed the AdventureWorks sample, you were probably asked for a directory to install to, that's where the database should be. If you don't recall where it went, try searching your hard drive for it. (Start | Search and then look for "AdventrueWorks*")

Once you know where it is, you can either change the path in the command above, or you can move it to the Data directory for the instanse of SQL that you want to attach it to. If search doesn't find the file, that probably means it either didn't get installed, or it was deleted. Try installing again. You may have to uninstall the sample from Add/Remove Programs before you can install it again.

Mike

|||

I basically have the same problem; however, I do have the: AdventureWorks_Data.mdf and AdventureWorks_log.ldf files in the proper directory. But I do a 'search' and do not see the 'AdventureWorks' db file.

I run the script:

exec sp_attach_db @.dbname=N'AdventureWorks', @.filename1=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf', @.filename2=N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_log.ldf'

and get:

Msg 1813, Level 16, State 2, Line 1

Could not open new database 'AdventureWorks'. CREATE DATABASE is aborted.

Msg 602, Level 21, State 50, Line 1

Could not find row in sysindexes for database ID 9, object ID 1, index ID 1. Run DBCC CHECKTABLE on sysindexes.

Thanks for any help in advance...

Thursday, March 8, 2012

ads wizard: Failure to open SQL Server with given connect string

Hi, sorry but I am just getting my feet wet with the ADS wizard. I have managed to get the PPC emulator running the ADS wizard and have the emulator ActiveSync connected with desktop. Port 1024 opens from the emulator to the desktop. On the ADS wiz I can connect to the device .sdf. WHen I try to connect to the desktop I am getting a connection failure in the ADS wiz log and after stepping through the code VS watch window gives the following message for the SQL exception:

Message "Failure to open SQL Server with given connect string. [ connect string =
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Northwind.accdb; Jet OLEDBTongue Tiedystem
Database=C:\\Documents and Settings\\vhaporellinr.POR-EE778886\\Application Data\\Microsoft\\Access\\system.mdw ]" string

I do not know enough to know where to go next to move past this no-doubt simple problem. Can you direct me to the appropriate docs or refs to start digging into looking for solutions?

Is there a particular Northwind.mdb file that is supposed to be used?

Are we talking some kind of permissions issues on the database?

I was assuming I did not have to install SQL Server 2005 and the SQL Server management console(?) to do development with the SSCE. Is that correct?

THank you for any helping pointers you can provide.

Try this connection string: Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\NorthWind.accdb;Persist Security Info=False

|||Hi Erik. Thanks for the string. Still having problems though. I am going to step back and run through the early tutorials which work with the Northwind.mdb and test.sdf files. This Northwind I am using might be the problem. TIme to pay some dues I guess. Thanks again for the help.|||

Ran into snags on Tutorial 1. Posted problem in this forum. Tutorial 2 worked pretty good. Dropped back to fussing around with access synchcronizer app. Messed with mdw file and other configuration settings. Changed to Access 2003 mdb file. Now application will not run on emulator at all. Same IIS problem when running on device.

I am going to temporarily abandon syncronizing to access database for now. One of these days I will try it on another computer, on a private network.

|||

I tried the ADS wizard installation on another computer on a private network. Tried Access 2003. At first received similar problems. Went back to readme.doc and examined it more precisely. Checked the registry, things looked ok. A Desktop IE would not open to the ads desktop server port. Went back to the XP Firewall settings. Added a 1024 port in the exceptions tab. Ran the ADS wizard exe on the PPC emulator ( had not tried that beforealways had used VS2005 debugger). The ADS wizard connected up to both device and desktop databases and pulled a 6MB database down to the device!

Things are looking pretty good right now on this system. Will check out the other machine/network Firewall settings in a few days. So far, it looks like it probably was operator error on my part causing all my problems.

Thank you Microsoft for investing in this SQL Server Compact Edition and providing this ADS Wizard application and source. The technology looks like the perfect fit for two of my current projects.

|||

Today I went back to previous problem system. I got the ADS Wizard to run on the PocketPC emulator after tweaking the firewall network card port settings and downloading and installing the .CAB file that ships with the syncapp package.

The ADS Wizard.exe that the .CAB file installs works great now on the emulator and will suffice until I need a custom app.

ADS user and sql 2005

I wish to use something other than sql's SA account user to connect to
my data warehouse, so I created a user in our active directory user.
Ill use dw as the new user as example.
after I created the user, dw, in ADS, I added the user via Management
Studio in SecurityLogins.
I grant ower of ads\dw to my datawarehouse.
I try to connect to the database engine using SQL Servier
Authentication, Login: ads\dw.
I get Cannot connect to xxxx, Login failed for user 'ads\dw' (Microsoft
SQL Server, Error: 18456).
Next, I add this user to the local server's administrators group (the
server is in admin mode) and login.
Now I can connect to the database as user dw. ( i suspect the users
memebership of administrator is the reason).
I dont wish to have the dw user part of administrator, but I want it to
have control over just the datawarehouse database.
What am I doing wroing?
TIA
RobMore Info:
I checked the server log and the error is state 6. I found a blog on
MSN and it says state 6 is 'Attempt to use a Windows login name with
SQL Authentication'.
Right, exactly what I thought I wanted to do.
I thought that when I added a windows user to a sql servers security
and login, that windows user can access the sql server??|||You need to give this user explicit credentials, typically make hime a
member of a role which has the right you need.

In SQL 2000 you do this under security. It's quite simple.

Regards,
Henrik

*** Sent via Developersdex http://www.developersdex.com ***|||rcamarda (robc390@.hotmail.com) writes:

Quote:

Originally Posted by

I wish to use something other than sql's SA account user to connect to
my data warehouse, so I created a user in our active directory user.
Ill use dw as the new user as example.
after I created the user, dw, in ADS, I added the user via Management
Studio in SecurityLogins.
I grant ower of ads\dw to my datawarehouse.
I try to connect to the database engine using SQL Servier
Authentication, Login: ads\dw.
I get Cannot connect to xxxx, Login failed for user 'ads\dw' (Microsoft
SQL Server, Error: 18456).


Mixing apples and oranges, I see. To log into SQL Server as ADS\dw,
you need to be logged into Windows as ADS\dw. That's what integrated
security is all about. By already being authenticated by Windows,
there is no need for SQL Server to authenticate you again. But you
cannot log into SQL Server with another Windows login than the one
you are logged into Windows with. You can only log into SQL Server
with an explicit username/password with an SQL login.

Quote:

Originally Posted by

Next, I add this user to the local server's administrators group (the
server is in admin mode) and login.


And dw now has sysadmin rights in the server, unless you remove
BUILTIN\Administrators.

Quote:

Originally Posted by

Now I can connect to the database as user dw. ( i suspect the users
memebership of administrator is the reason).
I dont wish to have the dw user part of administrator, but I want it to
have control over just the datawarehouse database.
What am I doing wroing?


First descide whether it's a Windows login or an SQL Login you want.
Next grant this user access to the server and database. Next you grant
him CONTROL on the database. (You are on SQL 2005, right?)

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland,
Yes I am on sql 2005. I am using Cognos' ReportNet (Now Cognos8) to
connect to its Content Store, a database. I need to provide a user and
password. I thought I would set up a user on ADS and provide the
account and password.
Out of confusion/frustration/ignorance I created a local user within
SQL server and it works just fine.
(I have several SQL servers for the database, and I thought using ADS
for user logins and authentication would be better).
So, was my problem more to do with trying to connect as another windows
user with the SQL Management tool? (I did not try to configure Cognos
since I could not connect via the SQL Studio)
Thanks for your help and any other pointers
Rob

ADS cannot push data to Access database

I am trying to push data from a SQL Server 2005 CE to an Access database and the data is not coming across. I can successfully connect to both databases and when I try to push the data I do not receive any errors. After the push I open my access database and none of the data from the mobile database is in it. Please help because this is an urgent issue. I can supply both the Access database and mobile database if it will help.

Tirrell Cotton

This is really frustrating. I've placed multiple requests for assistance on different Microsoft Forums, including the ASP.NET forum and this one, and have NEVER received any assistance or replies. I am not impressed with the level of service I'm receiving from Microsoft so I'll just forget about using the forums. Also, if anyone asks me if they should bother to place a post on the forums I'll just let them know not to waste their time, they'll have better luck searching Google for a solution. |||Hold your horses! - Assuming you are using the included ADS wizard, you are welcome to submit the config file and your two databases to me, and I will see if I can reproduce your problem. (I do not work for MS). You can find my email address on my profile here on the forum.

ADP dont shows table from MSDE

Hi,

I created one blank ADP to connect default tempdb database on MSDE on server ASHFAQUEPC (name of my msde server). Tested the connection was successful.

I created a table called Testtable from command prompt (MSSQL/Binn) in default tempdb of MSDE using following lines:

Binn>osql/U sa mypassword

1> use tempdb
1> go
1> Create table Testtable (Cnum integer NOT NULL PRIMARY KEY, City Varchar(15))
1> go

Table Created successfully then I added 2-3 records using following lines;

1> INSERT INTO testable (cnum, city)
1> values (1, abc)
1> go

1 Record affected and I did same to add 2-3 more records. Then I used following lines to see all the records I entered.

1> select * from testable
1> go

And a list of records displayed at command prompt. After exit from command prompt I found a Testtable appeared in the above ADP.

But next day when I opened my pc and opened ADP, I did not found the Testtable even though I re-connected to tempdb on MSDE from File menu. I reached then to command prompt to see whether the table itself is existing. Strange it was not there.

Can somebody tell me how can I get connected to testable automatically when I open my ADP? Where might have gone wrong? Do I need to create table again and input records?
I want to make sure before I do anything with my real dbs.

Any help would be highly appreciated.

With kind regards,
Ashfaque :confused:tempdb is recreated everytime sql server restarts. msde restarts when the last connection is closed. create a database with the create database command and create your table in there.|||Thanks Thrasymachus,

IC,
I will create my own db from scratch.

Thanks again....

Wiith kind regards,
Ashfaque|||You should definitely not be mucking around in TEMPDB, MASTER, or MSDB. Even MODEL should not be modified without good cause. Leave the system databases alone, and I'd advise you to read the manual BEFORE trying to fly the plane.|||What the blind dude is saying (with his usual grace and elegance), is that you really need to create a datbase for your purposes, and create all of you objects in there.

tempdb is a critical part of the sql server architecture that allows it to manage your "temporary" objects you can create. Temp tables, derived tables, etc. You should not interfere with it's operation.

btw, have you had a look at SQL Server Express and XM Manager?

It's still beta, but it should be coming out full time soon.

http://download.microsoft.com/download/a/6/3/a63ec922-913e-4228-93e3-970abff3fd66/ReadmeSQLExpMgr.htm|||Thanks blindman & Brett Kaiser for your advice.

I was not aware of behavior of these 4 default models on MSDE.

I upsized my MDB and it successfully created ADP and found steady. I can now go on to take further actions over it. I am close to mid-level carrier in handling MDBs in form of FE and BE. But as a little advance step, I used MSDE and I hope I could deal with it successfully with the help you Genius guys.
btw, have you had a look at SQL Server Express and XM Manager?
No, I did not take a look at SQL Server Express and XM Manager but I will do so.

Thanks again for you people..

With kind regards,
Ashfaque|||One more question...

I upsized the tables on MSDE successfully keeping the current db as MDB.

Why I dont know , the record in my subform is appearing but I can not enter new records any more..(Be is on MSDE). If my tables are on local (Not on MSDE server) it works fine.

Any idea ...?

With kind regards,

Ashfaque|||Could be a permissions issue with your login. Do you get any error messages?

Tuesday, March 6, 2012

AdomdConnection via a UDL file

To connect to a database engine by using types such as OleDbConnection, I can create a UDL file to connect to the database, then just use that UDL file by a connection string like "File Name = \\My Documents\\my.udl".

It seems that I cannot use this way to connect to SSAS. I can create a UDL file to connect to a local SSAS without any problem. However, when I use connection string like "File Name = \\My Documents\\myssas.udl" for AdomdConnection, I get the following error:

"The 'File Name' property name is not formatted correctly."

Could anyone tell me what is the correct format?

Thanks,

hz

hello,

right now supplying conneciton information for an AdomdConnection in a UDL file is not supported in Adomd.Net.

hope this clarifies.

|||

Thanks, Mary.

It is good to have this confirmed.

hz

ADOMD.NET Compression Not Working

I am using AdomdConnection to connect to analysis services over http through the msmdpump.dll in IIS. Here's my connection string...

connectionString="Provider=MSOLAP.3;user id=auserid;password=apassword;Data Source=http://servername/olap/msmdpump.dll; Initial Catalog=CatalogName; Transport Compression=Compressed; Compression Level=9;"

Everything works but some of the cellsets returned are large and I need compression. It is not returning a compressed http response. When I sniff the http request I do not see 'Accept-Encoding: gzip,deflate'. If I hit a regular web page with IE I see this in the http request headers and the content returned is compressed.

Any ideas anyone?

Thanks ahead of time.

Rich

This is a known problem and will be fixed in SP1.

_-_-_ Dave

AdoMd.Net 9.0 and AS2000

Hi,
I'm trying to connect to AS2000 using AdoMd.Net 9.0 and I get the following
error:
{"Retrieving the COM class factory for component with CLSID
{B9776FC2-70D8-4664-A0DF-998114524D67} failed due to the following error:
80040154."}
Trying to connect using AdoMd.Net 8.0 (same code, same connection string)
works just fine.
Runtime version: v2.0.50727
AdoMd.Net version: v9.0.242.0
AS2000 version: SP4
I've read that AdoMd.Net 9.0 should be able to connect to AS2000 with no
problem. Can someone point me in the right direction?
Thanks a lot in advance,
E
Ok, figured it out.
The file msadomdx.dll was not in the 90 sub-directory of the AdoMd.Net main
directory.
Thanks.
"Elad" <elad&&&7690@.hot&&&mail.com> wrote in message
news:OwRgmilmHHA.3996@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I'm trying to connect to AS2000 using AdoMd.Net 9.0 and I get the
> following error:
> {"Retrieving the COM class factory for component with CLSID
> {B9776FC2-70D8-4664-A0DF-998114524D67} failed due to the following error:
> 80040154."}
> Trying to connect using AdoMd.Net 8.0 (same code, same connection string)
> works just fine.
> Runtime version: v2.0.50727
> AdoMd.Net version: v9.0.242.0
> AS2000 version: SP4
> I've read that AdoMd.Net 9.0 should be able to connect to AS2000 with no
> problem. Can someone point me in the right direction?
> Thanks a lot in advance,
> E
>

ADOMD

Hello:
I've installed ADOMD.NET and I've tried to connect Analysis Service with
ASP.NET (using VB.NET). I receive errors but I don't know how I must use
ADOMD.NET. Can somebody help me and show me how I begin?
Thanks.
Regards.
look at this:
http://www.sqlserveranalysisservices...tGridIntro.htm
"Gema Snchez" <gema.sanchez@.grupo-episteme.com> wrote in message
news:OaL%23V8qYFHA.980@.TK2MSFTNGP12.phx.gbl...
> Hello:
> I've installed ADOMD.NET and I've tried to connect Analysis Service with
> ASP.NET (using VB.NET). I receive errors but I don't know how I must use
> ADOMD.NET. Can somebody help me and show me how I begin?
> Thanks.
> Regards.
>

ADOMD

Hello:
I've installed ADOMD.NET and I've tried to connect Analysis Service with
ASP.NET (using VB.NET). I receive errors but I don't know how I must use
ADOMD.NET. Can somebody help me and show me how I begin?
Thanks.
Regards.look at this:
http://www.sqlserveranalysisservice...etGridIntro.htm
"Gema Snchez" <gema.sanchez@.grupo-episteme.com> wrote in message
news:OaL%23V8qYFHA.980@.TK2MSFTNGP12.phx.gbl...
> Hello:
> I've installed ADOMD.NET and I've tried to connect Analysis Service with
> ASP.NET (using VB.NET). I receive errors but I don't know how I must use
> ADOMD.NET. Can somebody help me and show me how I begin?
> Thanks.
> Regards.
>

ADODB.Connection error '800a0e7a' in sql server 2005

i've developed one small application in asp with some vbscript and some javascript.

i connect to the database by:

Set DB = Server.CreateObject("ADODB.Connection")
DB.Open "Provider=sqloledb;Data Source=(local);Initial Catalog=HelpDesk;User Id=AAAAA;Password=********;"

all were going well (local sql server 2000) but... when i've moved the application to the application server with sql server 2005 i get the following error when i try to acced throw ie explorrer:

i have insttaled the latest mdac (2.8) and register the msdasql.dll

ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.

Help pls.

NS.

Please try to register sqloledb.dll, because you are using sqloledb provider.

Hope, it helps.

ADODB.Connection error '800a0e7a' in sql server 2005

i've developed one small application in asp with some vbscript and some javascript.

i connect to the database by:

Set DB = Server.CreateObject("ADODB.Connection")
DB.Open "Provider=sqloledb;Data Source=(local);Initial Catalog=HelpDesk;User Id=AAAAA;Password=********;"

all were going well (local sql server 2000) but... when i've moved the application to the application server with sql server 2005 i get the following error when i try to acced throw ie explorrer:

i have insttaled the latest mdac (2.8) and register the msdasql.dll

ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.

Help pls.

NS.

Please try to register sqloledb.dll, because you are using sqloledb provider.

Hope, it helps.

Saturday, February 25, 2012

ADODB connection with SQL2000SP3

my code is using ADODB connection to connect to SQL (Virtual) Server.

the way it being done is (c++):

ADODB::_ConnectionPtr m_dbConn;
ADODB::_RecordsetPtr m_dbRst;
m_dbConn.CreateInstance(__uuidof(ADODB::Connection ));
m_dbRst.CreateInstance( __uuidof( ADODB::Recordset ));
m_dbConn->ConnectionString=( L"DSN=mydsn" );
m_dbConn->Open("","sa","",-1);

lately after installing SP3 over SQL2000, it was impossible to connect
- the error message showed: login failed for user 'null)'. reason: not
associated with a trusted sql server connection.

so i changed the connection string to:
m_dbConn-> ConnectionString =(L"DSN=mydsn; UID=sa; PWD=;");
m_dbConn->Open("","","",-1);

and now it works !!

what is the reason for that ?
what in sql SP3 interrupt for this kind of connection ?
what is the difference ?liorh (liorhal@.gmail.com) writes:
> my code is using ADODB connection to connect to SQL (Virtual) Server.
> the way it being done is (c++):
> ADODB::_ConnectionPtr m_dbConn;
> ADODB::_RecordsetPtr m_dbRst;
> m_dbConn.CreateInstance(__uuidof(ADODB::Connection ));
> m_dbRst.CreateInstance( __uuidof( ADODB::Recordset ));
> m_dbConn->ConnectionString=( L"DSN=mydsn" );
> m_dbConn->Open("","sa","",-1);
> lately after installing SP3 over SQL2000, it was impossible to connect
> - the error message showed: login failed for user 'null)'. reason: not
> associated with a trusted sql server connection.
> so i changed the connection string to:
> m_dbConn-> ConnectionString =(L"DSN=mydsn; UID=sa; PWD=;");
> m_dbConn->Open("","","",-1);
> and now it works !!
> what is the reason for that ?
> what in sql SP3 interrupt for this kind of connection ?
> what is the difference ?

Since I don't know what is in that DSN, I would have to guess a bit.
Then again, I never liked DSNs. Anyway, my guess is that since SP3
was very focused on security, it may be that since you did not provide
a password, there is now a default for Windows authentication.

Anyway, running a system with a blank password for 'sa' is extremely
poor practice. So is it for that matter, to use sa to connect to SQL
Server from an application.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

ADODB - Cube connection error: Provider could not set DATASOURCE, USERID, or PASSWORD property

When attempting to connect to my cube from the same server, I receive this error:
"Provider could not set DATASOURCE, USERID, or PASSWORD property"

The connection works just fine from my machine, but when going from the server to the server, I profile it, and no connection attempts are made. The server is w2k3 SE sp1, and the successful client is win xp pro sp2.

The method I'm using is an adodb ConnectionClass in C# vs.net 2003. The adodb is using v2.8, and I used the component checker to make sure the server has 2.8 - it does.
I have the user name and password in the connection string,
"Provider=MSOLAP.3;Cache Authentication=True;Persist Security Info=False;Initial Catalog=thecatalog;Data Source=theServerName;"
calling the open like: cn.Open(ConnectionString, "theuser", "thepass", 0);
and if it successfully opens, then I make use of an adomd.cellset.

I'm currently checking component differences between the 2 machines, but does anyone have any specific things to try or specific components to check?

First I would make sure you can establish OLED connection from one machine to another.

You can find here some clues on how to troubleshoot connection problems: http://www.sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

Second, as you already suggested, I would check configuration of components.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

ADODB - Cube connection error: Provider could not set DATASOURCE, USERID, or PASSWORD proper

When attempting to connect to my cube from the same server, I receive this error:
"Provider could not set DATASOURCE, USERID, or PASSWORD property"

The connection works just fine from my machine, but when going from the server to the server, I profile it, and no connection attempts are made. The server is w2k3 SE sp1, and the successful client is win xp pro sp2.

The method I'm using is an adodb ConnectionClass in C# vs.net 2003. The adodb is using v2.8, and I used the component checker to make sure the server has 2.8 - it does.
I have the user name and password in the connection string,
"Provider=MSOLAP.3;Cache Authentication=True;Persist Security Info=False;Initial Catalog=thecatalog;Data Source=theServerName;"
calling the open like: cn.Open(ConnectionString, "theuser", "thepass", 0);
and if it successfully opens, then I make use of an adomd.cellset.

I'm currently checking component differences between the 2 machines, but does anyone have any specific things to try or specific components to check?

First I would make sure you can establish OLED connection from one machine to another.

You can find here some clues on how to troubleshoot connection problems: http://www.sqljunkies.com/WebLog/edwardm/archive/2006/05/26/21447.aspx

Second, as you already suggested, I would check configuration of components.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Friday, February 24, 2012

ADO.NET cannot connect to SQL2k, but Query Analyzer does

I have an ADO.NET (.NET 2.0) application that throws a connection exception when trying to connect to a SQL 2000 Standard server (despite what the message says about 2k5, which I assume is generic):

System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

The strange thing is that I can connect just fine to this server (and run the stored procedure in question) using Query Analyzer from the client machine. I have double- and tripple-checked the credentials (and had someone else look too) and they are correct. I also checked telnet to port 1433 and it doesn't fail to connect. Ping is shut down at the firewall.

The connection string looks like this (basically):

Data Source=10.0.0.137;Initial Catalog=XXXXXX;uid=xxxxx;pwd=xxxxx

This is conecting to a remote instance across a couple firewalls. Both machines are Windows Server 2003. I don't have much more information about the SQL 2000 server machine, but the client machine is running plain vanilla server 2k3 with no third party software firewalls or a/v.

Has anyone run into this before? I know Query Analyzer and ADO.NET user different connection methods, but the permissions shouldn't be any different, right?

Thanks in advance.

--
Jeremy Wadsack
Seven Simple Machines
http://7simplemachines.com/This seems to have resolved itself. Here's my speculation on what happened.

Note that the original error message explicitly states a named-pipe connection. (Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) This requires that the firewall allow both TCP port 1433 and UDP port 1434. However, I believe our firewalls were only set to allow the TCP port. It's odd that the ADO.NET 2.0 provider seems to default to named pipes when the connection string is an IP number. I have no idea what changed (we did rebuild it, but with no updates to the connection details) and I am guessing that it's now using IP connection.

Sorry I can't provide a better resolution for anyone else who may run into this.

--
Jeremy Wadsack
Seven Simple Machines
http://7simplemachines.com/|||unluckily, this has also been plaguing me. i'm just using sql server developer edition with allowed remote connections

ADO.NET cannot connect to SQL2k, but Query Analyzer does

I have an ADO.NET (.NET 2.0) application that throws a connection exception when trying to connect to a SQL 2000 Standard server (despite what the message says about 2k5, which I assume is generic):

System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

The strange thing is that I can connect just fine to this server (and run the stored procedure in question) using Query Analyzer from the client machine. I have double- and tripple-checked the credentials (and had someone else look too) and they are correct. I also checked telnet to port 1433 and it doesn't fail to connect. Ping is shut down at the firewall.

The connection string looks like this (basically):

Data Source=10.0.0.137;Initial Catalog=XXXXXX;uid=xxxxx;pwd=xxxxx

This is conecting to a remote instance across a couple firewalls. Both machines are Windows Server 2003. I don't have much more information about the SQL 2000 server machine, but the client machine is running plain vanilla server 2k3 with no third party software firewalls or a/v.

Has anyone run into this before? I know Query Analyzer and ADO.NET user different connection methods, but the permissions shouldn't be any different, right?

Thanks in advance.

--
Jeremy Wadsack
Seven Simple Machines
http://7simplemachines.com/This seems to have resolved itself. Here's my speculation on what happened.

Note that the original error message explicitly states a named-pipe connection. (Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) This requires that the firewall allow both TCP port 1433 and UDP port 1434. However, I believe our firewalls were only set to allow the TCP port. It's odd that the ADO.NET 2.0 provider seems to default to named pipes when the connection string is an IP number. I have no idea what changed (we did rebuild it, but with no updates to the connection details) and I am guessing that it's now using IP connection.

Sorry I can't provide a better resolution for anyone else who may run into this.

--
Jeremy Wadsack
Seven Simple Machines
http://7simplemachines.com/|||unluckily, this has also been plaguing me. i'm just using sql server developer edition with allowed remote connections

ADO.NET 2.0 and SQL 2003

Will ADO.NET 2.0 connect to MS SQL 2003 ? From within VWD Express ?SQL 2003? There is no such thing. There is SQL Server 2000 and SQL Server 2005. ADO.NET 2.0 can connect to either one.