PC Review


Reply
Thread Tools Rate Thread

Import Visual FoxPro file using code

 
 
amanda battye via AccessMonster.com
Guest
Posts: n/a
 
      12th Apr 2005
I have regularly been importing Visual Foxpro files into my access
database. I now want to automate this procedure with code/macro. However
I'm having trouble with the sytax.

To get the Database Name property, I linked the required table and looked
at the table properties as suggested in the help file. However, it looks
like there are too many arguments within it to me.

Also not really sure what to put for source and destination.

This is the code I have so far:
DoCmd.TransferDatabase acImport, "ODBC", "ODBC;DSN=Visual FoxPro Tables;" &
_
"SourceDB=U:\Coldharbour\Comp_B.DBC;SourceType=DBC;Exclusive=No;" & _
"BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;;TABLE=wname", _
acTable, "u:\coldharbour\Comp_B.DBC", "wname_b", False

any help would be much appreciated.

Amanda

--
Message posted via http://www.accessmonster.com
 
Reply With Quote
 
 
 
 
Cindy Winegarden
Guest
Posts: n/a
 
      13th Apr 2005
Hi Amanda.

I notice in your connection string you refer to file names like x.DBC. If
there is a DBC file present then the tables were created with Visual Foxpro
and you will need to use the Visual FoxPro ODBC driver, available from
http://msdn.microsoft.com/vfoxpro/downloads/updates .

--
Cindy Winegarden MCSD, Microsoft Visual Foxpro MVP
(E-Mail Removed) www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden


"amanda battye via AccessMonster.com" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
>I have regularly been importing Visual Foxpro files into my access
> database. I now want to automate this procedure with code/macro. However
> I'm having trouble with the sytax.
>
> To get the Database Name property, I linked the required table and looked
> at the table properties as suggested in the help file. However, it looks
> like there are too many arguments within it to me.
>
> Also not really sure what to put for source and destination.
>
> This is the code I have so far:
> DoCmd.TransferDatabase acImport, "ODBC", "ODBC;DSN=Visual FoxPro Tables;"
> &
> _
> "SourceDB=U:\Coldharbour\Comp_B.DBC;SourceType=DBC;Exclusive=No;" & _
> "BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;;TABLE=wname", _
> acTable, "u:\coldharbour\Comp_B.DBC", "wname_b", False



 
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
Re: Programmatic access to visual basic project via Visual FoxPro Jim Rech Microsoft Excel Programming 0 11th Jan 2007 02:53 PM
How can i import data from a Visual FoxPro 6.0 to an Access 2003 D =?Utf-8?B?UmljYXJkbw==?= Microsoft Access VBA Modules 5 27th Aug 2005 06:52 PM
Passing information between Visual C++ .net & Visual FoxPro =?Utf-8?B?UmFjaGVs?= Microsoft VC .NET 2 29th May 2005 02:09 PM
Access import visual foxpro table problem kelvin Microsoft Access Macros 0 24th May 2004 09:43 AM
Visual FoxPro Forms and Visual Studios DotNet =?Utf-8?B?SG9tZXlEYUNsb3du?= Microsoft Dot NET 4 17th Mar 2004 12:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:22 AM.