AndrewFlynn
Mar 17th, 2000, 12:03 PM
Hi,
Need a little help on this one.
I'm using VB5 to access dbf files (FoxPro 2.5). I open the database
and create recordset objects with SELECT queries to
extract data from certain tables. My problem is trying
to export (as a .dbf file) the data in these
recordsets.
I'm using (trying to anyway!!) the
SELECT * INTO [FoxPro 2.5;DATAEBASE=SaveDir].[NewTable] FROM [TABLE]
method.
But VB keeps telling me; Runtime error '3067':
Query input must contain at least one table or query.
Since this method needs a table to export data from - how do I create a table based on info in a recordset. It even gives me the same error when I directly specify an existing table!! Its driving me nuts.
Any suggestions would be greatly appreciated.
Andrew.
Dim DB1 As Database
Dim Filetr1 As Recordset
'Two Set statements work fine.
Set DB1 = Workspaces(0).OpenDatabase(dbpath, False,
False, "FoxPro 2.5;")
Set Filter1 = DB1.OpenRecordset("SELECT * " & _
"FROM AIJOQMAS WHERE TYPEFLAG = 'O' AND STATUS = 'A' " & _
"ORDER BY AIJOQMAS.REFNUM")
'Trying to use the following to export
txtSQL = "SELECT * INTO [FoxPro 2.5;DATABASE=SaveDir].[Table] " & _
"FROM [AIJOQMAS]"
DB1.Execute txtSQL
'This gives me the error, even though AIJOQMAS is an
'existing table.
Need a little help on this one.
I'm using VB5 to access dbf files (FoxPro 2.5). I open the database
and create recordset objects with SELECT queries to
extract data from certain tables. My problem is trying
to export (as a .dbf file) the data in these
recordsets.
I'm using (trying to anyway!!) the
SELECT * INTO [FoxPro 2.5;DATAEBASE=SaveDir].[NewTable] FROM [TABLE]
method.
But VB keeps telling me; Runtime error '3067':
Query input must contain at least one table or query.
Since this method needs a table to export data from - how do I create a table based on info in a recordset. It even gives me the same error when I directly specify an existing table!! Its driving me nuts.
Any suggestions would be greatly appreciated.
Andrew.
Dim DB1 As Database
Dim Filetr1 As Recordset
'Two Set statements work fine.
Set DB1 = Workspaces(0).OpenDatabase(dbpath, False,
False, "FoxPro 2.5;")
Set Filter1 = DB1.OpenRecordset("SELECT * " & _
"FROM AIJOQMAS WHERE TYPEFLAG = 'O' AND STATUS = 'A' " & _
"ORDER BY AIJOQMAS.REFNUM")
'Trying to use the following to export
txtSQL = "SELECT * INTO [FoxPro 2.5;DATABASE=SaveDir].[Table] " & _
"FROM [AIJOQMAS]"
DB1.Execute txtSQL
'This gives me the error, even though AIJOQMAS is an
'existing table.