Information générale
Catégorie:
Applications Internet
Titre:
SQL update with different database
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement