Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Copying VFP 8 tables to an Access MDB

 
   Database Help (Home) -> Visual Basic RSS
Next:  Getting the value from an auto increment field?  
Author Message
Utf-8BUmljaEc

External


Since: May 21, 2004
Posts: 8



(Msg. 1) Posted: Tue May 25, 2004 12:01 am
Post subject: Copying VFP 8 tables to an Access MDB
Archived from groups: microsoft>public>vb>database (more info?)

I posted a message earlier concerning attaching to a VFP 8 directory as a database. I was able to do so but my ADO knowledge is limited.
I was able to open a dbf in ADO courtesy of Cindy


con.ConnectionString = _
"Data Source=" & dbfPath & ";" & _
"Provider=""VFPOLEDB.1"";"

con.CursorLocation = adUseClient
con.Mode = adModeRead
con.Open

'Get the names of the dbf's one at a time...................
dbfName = Dir(dbfPath & "\*.dbf")
While Not Len(dbfName) = 0

'Strip off the .DBF from the name...........
dbfName = Left(dbfName, InStr(dbfName, ".") - 1)


'This works..................I can read a field name and value
Set rst = con.Execute("SELECT * From " & dbfName)
If Not rst.BOF Then


'I would like to replicate the dbf in an MDB with the following but I get a syntax error.

con.Execute ("SELECT " & dbfName & ".* INTO " & dbfName & " " & _
"IN 'C:\TEMP\Temp\AccuPrint\vfl.mdb' " & _
"From " & dbfName & "")

This is a common SQL syntax but it fails in ADO.
Does this usually work in ADO?????

 >> Stay informed about: Copying VFP 8 tables to an Access MDB 
Back to top
Login to vote
Cindy Winegarden

External


Since: Oct 02, 2003
Posts: 32



(Msg. 2) Posted: Fri May 28, 2004 2:29 am
Post subject: Re: Copying VFP 8 tables to an Access MDB [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In news: 2F6AFA76-36F7-45B0-8F96-963C9A438C28 RemoveThis @microsoft.com,
RichG <anonymous RemoveThis @discussions.microsoft.com> wrote:
 > .....
 > con.ConnectionString = _
 > "Data Source=" & dbfPath & ";" & _
 > "Provider=""VFPOLEDB.1"";"
 > ........
 > 'I would like to replicate the dbf in an MDB with the following but I
 > get a syntax error.
 >
 > con.Execute ("SELECT " & dbfName & ".* INTO " &
 > dbfName & " " & _ "IN
 > 'C:\TEMP\Temp\AccuPrint\vfl.mdb' " & _ "From
 > " & dbfName & "")
 >
 > This is a common SQL syntax but it fails in ADO.
 > Does this usually work in ADO?????

Hi Rich,

You're using the VFP OLE DB provider to talk to VFP tables. You can only use
commands that the VFP OLE DB provider supports. While the VFP SQL Select
statement supports selecting into a FoxPro DBF it does not support selecting
into an Access MDB.

--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy.winegarden RemoveThis @mvps.org <a style='text-decoration: underline;' href="http://www.cindywinegarden.com" target="_blank">www.cindywinegarden.com</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Copying VFP 8 tables to an Access MDB 
Back to top
Login to vote
Utf-8BUmljaEc

External


Since: May 21, 2004
Posts: 8



(Msg. 3) Posted: Sun May 30, 2004 1:21 pm
Post subject: Re: Copying VFP 8 tables to an Access MDB [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Back to top
Login to vote
Display posts from previous:   
Related Topics:
Getting at access feilds indirectly - Hi, I'm trying to build a generic routine that will load a combobox from a table: Public Sub Load_Class(InCntl As ComboBox, s_Table As String, s_Item_Name As String, s_Index_Name As String) Dim ss_Temp As Recordset On Error GoTo 0 If Not..

Cannot Delete Pocket Access File - I'm creating a Pocket Access file (via an EVB application) on a mobile device running PPC 2002. When the user logs off the EVB application, I want to delete the Access file (stored in the /Temp folder). However, I am unable to do this because the..

Access 2002 Automation problem with OpenReport - My VB 6 application needs to print a report in an Access 2002 database. This was working fine when I used Access 97 but now the application quits without any errors on the DoCmd.OpenReport line. I have my VB application references set to access 10.0. ....

sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table "PriceList" and there a column "Pricemk" wich is data type "money". All data in this column is in form "10001,35". So why when...

arrays - is there a way to concatenate the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]