Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
From vfp update access table
Hi
We have some access table containing information about client. The main table about client is a foxpro free table and from foxpro we need to update the access table
With this program I can export access table to vfp table and compare information with the master table (vfp free table). When some information is different I can make the change in the cursor but at the end I need to return the information in the original access table
Here is the code I use to extract data from access.
lcMDBDir = 'd:\bin\'
lcMDBName = 'CFISSUER.MDB'
lnConnHandle = SQLSTRINGCONNECT('DSN=MS Access Database;DBQ='+;
lcMDBDir+'\'+lcMDBName+';DefaultDir='+;
lcMDBDir+';DriverId=25;FIL=MS Access;MaxBufferSize=2048;'+;
'PageTimeout=5;UID=admin;')
lcSQL = "select * from [otherissuer] " &&where [RequiredDate] between ?ldStart and ?ldEnd
SQLExec(lnConnHandle, lcSQL, 'MyResult') && Get result into cursor myResult
SQLDisconnect(lnConnHandle)
Select myResult
scan
* here I can scan and compare with the master table and update the cursor (myResult) with the data from the master
endscan
* after I want to do something like delete all record in the access table(otherissuer) and import data from the cursor myResult
Thanks
Mike
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