I found using ADOX the best route.  You need to beware of the way Access 
treats blanks, dates subtly differently though (always set date american).

Here's some code ripped from a prog I have that might help:

cStartIn = ADDBS(SYS(5) + SYS(2003))
cMDB = cStartIn + 'WinSIMS.mdb'
cDBF = 'pdaexp'
cDBFfull = cStartIn + cDBF + '.dbf'

IF FILE(cMDB)
        ERASE (cMDB) RECYCLE
ENDIF

IF TYPE('pCcount') <> 'C'
        pCcount = TRANSFORM(RECCOUNT())
ENDIF

oCatalog = CREATEOBJECT("ADOX.Catalog")
cMDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + cMDB + ;
        ";Jet OLEDB:Engine Type=5;"
oCatalog.CREATE(cMDBConnString)

oTable = CREATEOBJECT("ADOX.Table")
oTable.NAME = JUSTSTEM(cMDB)
oTable.ParentCatalog = oCatalog

cDBFConnString = "Provider=VFPOLEDB.1;Data Source=" + cStartin + ;
        ";Password='';Collating Sequence=MACHINE"

oDBF = GetRS('SELECT * FROM ' + cDBF, cDBFConnString)

CreateAccessTable()

oMDB = GetRS('SELECT * FROM ' + oTable.NAME, cMDBConnString)

CopyData()

oDBF.CLOSE
oMDB.CLOSE

Sytze de Boer wrote:
> Hi Folk
> I have a table which, amongst other fields, has
> fname,sname,ad1,ad2,ad3
> 
> There's also an Access MDB file.
> 
> I need to update the Access file with my VFP9 data
> 
> Has anyone done this type of things and is there an easy way to do this ?
> 


-- 
Cheers

============
Brian Abbott
============


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to