Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL update with different database
Message
De
02/11/1998 16:06:28
 
 
À
02/11/1998 15:35:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00153692
Message ID:
00153702
Vues:
18
Hi Stephane ---

I don't think you can use one DSN for two SQL Server databases but I could be wrong. Are you explicitly naming the database in all SQL statements, ie, "SELECT * FROM database table" ?


>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
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform