General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Pass thru How select different database?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only