Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using a SQL Server File DSN from within VFP
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00764428
Message ID:
00764757
Views:
27
Thanks guys for all the help !
Was able to get it to work with a few mods. Ended up looking as folows :

PUBLIC hconn
hconn = SQLSTRINGCONNECT([filedsn=c:\temp\sqlfiledsn.dsn])

IF hconn <= 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
= MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
= SQLEXEC(hconn,"SELECT * from testtable","test1")
= SQLDISCONNECT(hconn)
ENDIF

I'll end up putting the actual dsn somewhere on our network that the users won't be able to accidentally delete (like they did their System DSN's).

Thanks again.
Previous
Reply
Map
View

Click here to load this message in the networking platform