Copying VFP 8 tables to an Access MDB
From: RichG (anonymous_at_discussions.microsoft.com)
Date: 05/25/04
- Next message: Daniel: "datagrid control requery problem"
- Previous message: Jezebel: "Re: Getting the value from an auto increment field?"
- Next in thread: Cindy Winegarden: "Re: Copying VFP 8 tables to an Access MDB"
- Reply: Cindy Winegarden: "Re: Copying VFP 8 tables to an Access MDB"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 May 2004 21:01:06 -0700
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?????
- Next message: Daniel: "datagrid control requery problem"
- Previous message: Jezebel: "Re: Getting the value from an auto increment field?"
- Next in thread: Cindy Winegarden: "Re: Copying VFP 8 tables to an Access MDB"
- Reply: Cindy Winegarden: "Re: Copying VFP 8 tables to an Access MDB"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|