Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Pass thru How select different database?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00759877
Message ID:
00759932
Vues:
20
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform