Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP to SQL7 update error
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
VFP to SQL7 update error
Divers
Thread ID:
00614779
Message ID:
00614779
Vues:
56
Hi,

Were updating SQL7 database records from VFP tables using ADO recordsets but were getting the following error message when updating the second field:
"OLE IDispatch exception code 0 from Microsoft Cursor Engine: Multiple-step operation generated errors. Check each status value..."
We use the following piece of code:
oConnection = Createobject("ADODB.Connection")
oConnection.Open("SQLTEST","UserName","PassWord")

oRecordSet = CREATEOBJECT("ADODB.RecordSet")
WITH oRecordset
   .Cursorlocation= 3			&& Use Client
   .CursorType = 3			&& Open Static
   .LockType = 3  			&& Lock Optimistic
   .Open("mytable", oConnection)	&& SQL table (target)
   .MarshalOptions = 0			&& Marshal All

   SELECT MyTable   			&& VFP table (source)
   lnFldCnt = FCOUNT()

   SCAN
      .AddNew()
      FOR lnF = 1 TO lnFldCnt
         .Fields(FIELD(lnF)).Value = EVAL(FIELD(lnF))  && it fails here when lnF > 1
         ?.Fields(FIELD(lnF)).Value
      ENDFOR
      .Update()
   ENDSCAN
ENDWITH
Any help is greatly appreciated.

TIA,
Arriyel
Speak using soft and sweet words in case you have to eat them later.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform