PC Review


Reply
Thread Tools Rate Thread

Importing FoxPro 2.6 DBF Into Access 2007

 
 
Redelman
Guest
Posts: n/a
 
      20th Nov 2009
All - I am looking for a little help. As part of a larger application, I
need to IMPORT (not link) a FoxPro 2.6 DBF into a Access DB.

I am doing so with a Access MODULE and in the module, using the
docmd.TransferDatabase method.

I have looked for days at different samples and I cannot seem to find the
answer.

My OS is Win7, 64-Bit. Access 2007 is installed.

This application is intended to be distributed with NO ASSURANCE the user
will have the FoxPro OLE driver installed. Knowing that the ODBC driver will
most likely be installed as part of MDAC, it is pretty safe to use the ODBC
driver that is already installed - Visual FoxPro Tables.

I do not want the user to use the ODBC Admin tool to configure the setup for
this default driver - It all needs to be done in code.

The code I am trying is:
DoCmd.TransferDatabase acImport, "ODBC Database", "ODBC;DSN=Visual FoxPro
Tables;SourceType=DBF;SourceDB=z:\temp\sampleus.dbf;Collate=Machine",
acTable, "sampleus.dbf", "ccimported"

Following the structure of the command, I am trying to:
-Perform an Import
-Using the ODBC Database driver and the default DSN for this.
-The table is a "free table directory" type (DBF)
-The path to the file is z:\temp
-The filename is sampleus.dbf
-I want to call name the imported table ccimported when it is imported.

I have tried different combinations of the above - specifically setting
SourceDB=z:\temp\ with no luck.

Has anyone done this or can you help with the Transferdatabase method?

Thanks,
Roger
 
Reply With Quote
 
 
 
 
Redelman
Guest
Posts: n/a
 
      21st Nov 2009
Problem solved.....


DoCmd.TransferDatabase acImport, "ODBC Database", "ODBC;DSN=Visual FoxPro
Tables;SourceType=DBF;SourceDB=z:\temp\;Collate=Machine", acTable,
"sampleus", "Importzzz"




"Redelman" wrote:

> All - I am looking for a little help. As part of a larger application, I
> need to IMPORT (not link) a FoxPro 2.6 DBF into a Access DB.
>
> I am doing so with a Access MODULE and in the module, using the
> docmd.TransferDatabase method.
>
> I have looked for days at different samples and I cannot seem to find the
> answer.
>
> My OS is Win7, 64-Bit. Access 2007 is installed.
>
> This application is intended to be distributed with NO ASSURANCE the user
> will have the FoxPro OLE driver installed. Knowing that the ODBC driver will
> most likely be installed as part of MDAC, it is pretty safe to use the ODBC
> driver that is already installed - Visual FoxPro Tables.
>
> I do not want the user to use the ODBC Admin tool to configure the setup for
> this default driver - It all needs to be done in code.
>
> The code I am trying is:
> DoCmd.TransferDatabase acImport, "ODBC Database", "ODBC;DSN=Visual FoxPro
> Tables;SourceType=DBF;SourceDB=z:\temp\sampleus.dbf;Collate=Machine",
> acTable, "sampleus.dbf", "ccimported"
>
> Following the structure of the command, I am trying to:
> -Perform an Import
> -Using the ODBC Database driver and the default DSN for this.
> -The table is a "free table directory" type (DBF)
> -The path to the file is z:\temp
> -The filename is sampleus.dbf
> -I want to call name the imported table ccimported when it is imported.
>
> I have tried different combinations of the above - specifically setting
> SourceDB=z:\temp\ with no luck.
>
> Has anyone done this or can you help with the Transferdatabase method?
>
> Thanks,
> Roger

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing data from Foxpro (DOS) to Access 2003 James Martin Microsoft Access External Data 7 6th Jul 2005 04:13 PM
importing Microsoft FoxPro file into Access 97 Phil Microsoft Access External Data 0 29th Oct 2003 01:45 AM
Importing FoxPro 2.6 Tables into Access 2002 Jackson K McAfee Microsoft Access External Data 2 28th Oct 2003 02:00 PM
Re: importing/opening foxpro dbfs to ms access Cindy Winegarden Microsoft Access 1 23rd Jul 2003 07:59 PM
Importing FoxPro table to Access mgannon Microsoft Access External Data 0 18th Jul 2003 02:21 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:59 PM.