Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ODBC in VFP
Message
From
05/10/2011 12:31:13
 
 
To
05/10/2011 12:04:52
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01525567
Message ID:
01525654
Views:
55
wow, great, I can switch the database, it really works.

however I still have problem, the views in the DataEnvironment still stick to the old database (set by ODBC).

is that possible I can switch them too?

thanks for the help.

regards,

Jerry





>Now you could try
>
>SQLEXEC(returnValue,"Use databasename")
>
>
>If you then say
>
>SQLEXEC(returnValue,"SHOW TABLES")
>BROWSE
>
>You should see the tables of the databasename you switched to.
>
>>I use:
>>
>>
>>STORE SQLCONNECT(_SCREEN.zSqlDsn, _SCREEN.zSqlId, _SCREEN.zSqlPword) TO returnValue
>>
>>
>>where:
>>(_SCREEN.zSqlDsn = datasource name
>>
>>since the format is:
>>
>>
>>SQLConnect(cDataSourcename, cUserID, cPassword)
>>
>>
>>I'm not sure how to insert the database name.
>>
>>please advise
>>thanks for the help
>>
>>regards,
>>
>>Jerry
>>
>>
>>
>>>>I'm using MySQL database.
>>>>each time I want to switch to another database I have to go through MySQL ODBC.
>>>>is that possible to change the database from inside VFP?
>>>>
>>>>regards,
>>>>
>>>>Jerry
>>>
>>>Once you have a connection that you created with SQLSTRINGCONNECT() you can switch database:
>>>
>>>SQLEXEC(nConnectionHandle,"USE MyDatabase;")
>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform