Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC connection my first attempt
Message
From
09/08/2016 14:07:23
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2008 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01639227
Message ID:
01639262
Views:
73
My first attempts are with errors of course. I am using the IP address for the server as directed by the admin providing the remote SQL server. he sent me examples with Access as the front end. I get an error then i get an alternate server login box. No luck with either of those, but I'll keep plugging along; any advice appreciated. Thanks.

(by the way, I was able to get the DSN method to work for me) but not your recommended method.
gc_sqlserver = ALLTRIM("10.0.0.107")
gc_sqluser = ALLTRIM("NC.plant")
gc_sqlpassword = ALLTRIM("The@r0|ina&."
gc_database = ALLTRIM("ECNC Interface")



*-- Connect to SQL Server
SET MESSAGE TO "connecting"
lcConnString ="Driver=SQL Server;Server=" + gc_sqlserver + ";Database=" + gc_database
lcConnstring = lcConnstring + ";UID =" + gc_sqluser + ";PWD =" + gc_sqlpassword 

gnsqlHandle = SQLStringConnect(lcConnString)
if gnsqlHandle < 1
	? "you have a connection problem"
endif
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform