Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL update with different database
Message
From
02/11/1998 15:35:58
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
SQL update with different database
Miscellaneous
Thread ID:
00153692
Message ID:
00153692
Views:
51
HI !

I have a problem with VFP 5.0 and SQL Server 6.5.
I want to update 2 tables that are in a different database in SQL Server.

code with the problem
=================
1- I use the command "SQLConfigDataSource" to create a datasource for my server. The database is the database by default. (Database_1)
2- I create one connection to SQL with the command "SQLCONNECT" for my tables.
3- I make each cursor updatable.

When I update the table that is in the default database (Database_1) of the DataSource everything works fine.
But, for the other table (in Database_2) I receive the error : [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'MySecondTable'.

code to resolve the problem
=====================
1- I create 2 DataSources. (One for each Database in Sql Server).
2- I create 2 connections. (One for each Table).
When I update the data, my code just works fine.

Did someone know a better way to update tables in different database.
Can I use only one DataSource ?

Thanks in advance ! :o)

Steph
Next
Reply
Map
View

Click here to load this message in the networking platform