Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with VFP : ADO use OLEDB provider for SQL Server
Message
De
19/03/2001 08:49:07
 
 
À
18/03/2001 22:49:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00486368
Message ID:
00486442
Vues:
12
Create two record sets, one for each table, then update each separately.


>I am using ADO to connect to SQL Server, and I wanted to update two tables throung a view like this :
>
>lcCn_string = this.Get_Connect_String()
>oCn = CreateObject("ADODB.Connection")
>
>with oCn
>.Provider = "SQLOLEDB.1"
>.ConnectionString = lcCn_string
>.Open( lcCn_string)
>endwith
>
>lcSQL = ' select a.hh_id, a.column1, a.column2, b.gg_id, b.column3, b.column4 '
>lcSQL = ' from HH_CTU a iner join GG_CTU b on a.hh_id = b.hh_id '
>
>oRs = CREATEOBJECT("ADODB.Recordset")
>with oRs
>.CursorLocation = adUseServer
>.CursorType = adOpenDynamic
>.LockType = adLockOptimistic
>.ActiveConnection = this.oCn
>.Open(lcSQL)
>endwith
>
>when I updated colums only on one table HH_CTU or GG_CTU(colum1, column2 or colum3, column4), it work fine, But when I tried to update columns on 2 table (colum1, column3), it generated a error, said that I can't update 2 table. How can I solve this problem ?
>
>Thanks in advance for any help.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform