Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Pass thru How select different database?
Message
From
01/03/2003 04:22:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Pass thru How select different database?
Miscellaneous
Thread ID:
00759877
Message ID:
00759877
Views:
62
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
Next
Reply
Map
View

Click here to load this message in the networking platform