Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADODB Connection
Message
 
 
To
20/08/2003 16:38:07
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00821994
Message ID:
00822009
Views:
19
Hi Kumar,

A couple of changes. The 'Data Source' should point to the server name or address 'Data Source=TESTSERVER'. The connection open method parameters doesn't look right to me. The first one is the connection string and "USHM" doesn't look as one. The second and third parameters are login name and pasword. You've to provide them if you're using SQL security or ommit them alltogether otherwise. It should be
oConnection.open(, < SQL user name >, < password >)     && SQL security
* or
oConnection.open()    && Windows security
>Hi All,
> Basically I need to create a Web service on my machine. So I ‘ve created a ADO interface to connect to my SQL Server for accessing the tables. I have the following problem when I open the database using oConnection.Open. Error Message: OLE Idispatch exception code 0 from Microsoft OLE DB Provider for SQLServer:[DBNETLIB][ConnectionOpen(Connect().]Sql Server does not exist or access denied.
>
>I don’t know what is the problem? May be I am having security rights?
>Please help.
>
>Thanks,
>
>Code:
>  LOCAL oConnection as Variant
>  LOCAL loCommand as Variant
>  oConnection = CREATEOBJECT("ADODB.connection")
>  WITH oConnection
>          .Provider = "SQLOLEDB.1"
>          .ConnectionString = "Persist Security Info=False;
>           Data Source=TESTSERVER\USHM;
>           Auto Translate=True;Use Encryption for Data=False;
>            Tag with column collation when possible=False"
>   ENDWITH
>   oConnection.open("USHM"," "," ")
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform