Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way to convert a foxpro table to an access table
Message
From
03/07/2000 16:57:37
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00387212
Message ID:
00387864
Views:
16
>>>>I'm not familiar with access. I've been told to make a blank template mdb and, using access and ODBC, import the data.
>>>
>>>I had to do this recently and the fastest method I found was the user doing the open a blank MDB and then importing from the foxpro table. If you are importing from a free table then just choose the foxpro dbf as a type. If you are importing from VFP tables that belong to a database then you can tell the type to look for foxpro version 3.0 dbc (which works ok with version 6 stuff).
>>
>>Actually, it has to been programatically. This is for a web app. The user will click a link to import table as "Access". Behind the scenes in code we will create the access table and then send the table down the wire.
>
>I dont know of a VFP program way to export to access. I would think that you would have to do some sort of VB on the other side that will take the VFP table to ACCESS. I would like to know myself so I will keep an eye on this thread if there is a VFP way of doing it. It would be great if VFP had an export to ACCESS command.

Here's the code. I'm not sure about the 0 and the 1 as parameters. I know the default is import for the first argument or acImport. I couldn't find the header that defined that parameter, so I passed 0 hoping the default would take. And the 1 is for acTable. It was actually easier than the other approach.

oAccess = CreateObject("Access.Application")
oAccess.NewCurrentdatabase("d:\Customer.mdb")

oAccess.DoCmd.TransferDatabase( 0, "Foxpro 3.0", "D:\IclData\Honda\", 1, "Menu", "Menu" )
Previous
Reply
Map
View

Click here to load this message in the networking platform