Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Pass thru How select different database?
Message
De
01/03/2003 04:22:18
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL Pass thru How select different database?
Divers
Thread ID:
00759877
Message ID:
00759877
Vues:
56
Hi,

I've connected to a single datasource that has multiple databases.
After initial connection I get info and issued connect to new database.
But VFP refuses to let go of the original database. I'm using
SQL Pass through. Is it possible to do this? I tried issuing a
CLOSE DATABASE after getting data from first database then creating
a new database thing it would release the info but no go.

My question is how do I switch between two databases that have one
datasource? Thanks

create database ctes && Temp on the fly cursor

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")

=SQLDISCONNECT(0)
CLOSE DATABASES
ERASE ctes.dbc
ERASE ctes.dct
ERASE ctes.dcx
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform