Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection to Access
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00410183
Message ID:
00411805
Views:
12
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
Previous
Reply
Map
View

Click here to load this message in the networking platform