Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Pass thru How select different database?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00759877
Message ID:
00759932
Views:
19
>create connection allt(l_sqladdr) datasource allt(l_sqlsourc) USERID allt(l_sqlid) PASSWORD allt(l_sqlpass) database allt(l_sqldata)
>
>&& Connect and get file handel
>temp11 = sqlconnect(allt(l_sqlsourc),allt(l_sqlid),allt(l_sqlpass))
>
>lnresult = sqlexec(temp11,"SELECT * FROM scomp", "STSYS")


Gary,

Is it absolutely necessary for you to create a connection within your DBC? Try using SQLSTRINGCONNECT() instead and pass the appropriate info in the string, which could include a database qualifier. That way after disconnecting your original handle, you can issue a new SQLSTRINGCONNECT() and specify the new database.

Laterness,
Jon
Jon Rosenbaum
Devcon Drummer
Previous
Reply
Map
View

Click here to load this message in the networking platform