>>>Ok then, let me ask this - what's the difference between VS (c#) and VFP in making the connection to an SQL backend? I'm trying to use the same userid/password that our website uses to connect to the same server, different DB.
>>>I can, however, connect to the server with this userid/password and run querys against the DB I'm trying to connect to; but when I try to use these credentials via VFP I get 'Login denied'
>>
>>I don't know how do you connect What do you use in C# and what in VFP?
>>SqlConnection() in C# and SQLSTRINGCONNECT() in VFP?
>>Caould you please post the connection strin from C# (remove all sensitive data in it)
>
>c#
>connectionString ="data source=204.67.nn.nnn; initial catalog=DataWarehouseDB; user id=#########;password=#########;Trusted_Connection=False;"
TEXT TO lcConnection NOSHOW PRETEXT 15
Driver={SQL Server};Database=DataWarehouseDB;Server=204.67.nn.nnn;UID=USERID;PWD=PASSOWRD;
ENDTEXT
lnHandler = SQLSTRINGCONNECT(lcConnection)
IF lnHandler < 0
AERROR(aaa)
MessageBox(aaa[1,2])
ELSE
MessageBox("Connection is successful")
ENDIF
SQLDISCONNECT(0)
Just change IP address to the real one and of course SQL user and SQL Password
If this didn't work try to force protocol to be TCP/IP or Named Pipes
Just add to connection string:
;Network=dbnmpntw - for Named pipes
Network=dbmssocn; - for TCP/IP
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.