>>>>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only