Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Connection to Access
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00410183
Message ID:
00411805
Vues:
13
You could try to use ADO to connect to an existing Access database, create new table and fill it with the data.

HTH, Igor

>In one of my applications I need to copy the contents of a Foxpro table into Access.
>I have been able to do the following from within VFP
>- create an Access object
>- create an empty Access database
>- link the table into the Access database
>
>This all looks as follows:
>
>lcphl_xx = 'c:\temp\'
>lcphlxx = 'trans_dk'
>IF FILE(lcphl_xx + lcphlxx + '.mdb')
> delete file (lcphl_xx + lcphlxx + '.mdb')
>ENDIF
>
>oAccess = CreateObject("Access.Application")
>oAccess.newcurrentdatabase(lcphl_xx + lcphlxx )
>oDb = oAccess.CurrentDb
>oTable = oDb.CreateTableDef(lcphlxx)
>
>* Link
>oTable.Connect = "DBase IV;DATABASE=" + lcphl_xx
>oTable.SourceTableName= lcphlxx + '.dbf'
>oDb.TableDefs.Append( oTable )
>
>What I would really like to have is not a 'link' to the table. I want to import the data into Access. Can anyone point me in the right direction.
>
>Thanks,
>
>Ron Brahma
Igor Gelin
Database Developer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform