Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / April 2005



Tip: Looking for answers? Try searching our database.

ADO connection errors

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Griff - 29 Apr 2005 22:03 GMT
I'm getting ADO connection errors when I attempt to connect to a SQLServer
2000 DB.  I'm using VB6 & ADO 2.8.

My connection is as follows:

 Set oCN = New ADODB.Connection
   With oCN
       .CursorLocation = adUseClient
       .ConnectionTimeout = 50
       .CommandTimeout = 200
       .ConnectionString = "Provider=MSDataShape;Data
Provider=SQLOLEDB;Password=" & sPassword & ";Persist Security Info=True;User
ID=" & sUsername & ";Initial Catalog=" & sCatalog & ";Data Source=" &
sServer
       .Open
   End With

The connection opens and can be used, but gives the following two errors - I
think that they may be relevant later on...

Error #1
Description: One or more properties cannot be returned
NativeError: 44
Number -2147217887
Source: MSDataShape

Error #2:
Description: Provider does not support the property
NativeError: -2147217887
Number: -2147217887
Source: ADODB.Connection

At wits end...

Thanks

Griff
Veign - 29 Apr 2005 22:11 GMT
This link:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdre
fmsdatashape.asp


States that the Provider to be:
"Provider=MSDataShape;Data Provider=MSDASQL"

This is from www.connectionstrings.com
"Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=Aron1;Initial
Catalog=pubs;User ID=sa;Password=asdasd;"

One more:
Provider=MSDataShape;Data Provider=MSDASQL;Persist Security
Info=False;Extended Properties='Description=SQL;DRIVER=SQL
Server;SERVER=MyServer;WSID=MyComputer;DATABASE=Northwind;Trusted_Connection
=Yes';Initial Catalog=NorthWind"

I have only done DataShaping to Access to unsure how SQL Server handles it
(or if there is a SQL Server way of doing it)

Signature

Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/

> I'm getting ADO connection errors when I attempt to connect to a SQLServer
> 2000 DB.  I'm using VB6 & ADO 2.8.
[quoted text clipped - 33 lines]
>
> Griff
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.