sduraiappa
Programmer
I am trying to extract some records from a table (exam.dbf) and copy the recordset to another dbf file.
I use the following connection string:
CNSTR = "Provider=MSDASQL.1;" & _
"Persist Security Info=False;" & _
"Driver={Microsoft Visual FoxPro Driver};" & _
"SourceDB= " & SRC_DBF_FILE & ";" & _
"SourceType=DBF;Exclusive=No;" & _
"BackgroundFetch=Yes;Collate=General;Deleted=Yes"
cn1.Open CNSTR
And i have the following statements:
STR1 = "select * from exam where date>={^" &
Format(FROMDT, "yyyy/mm/dd") & "} and date<={^" &
Format(TODT, "yyyy/mm/dd") & "} INTO TABLE " &
TDEST_FOLDER & "EXAMNEW.dbf"
cn1.Execute STR1
When i run the statements i dont get the new DBF file EXAMNEW.DBF in the Tdest_folder.
I am not sure where i get the error. If i run the same query in visual foxpro i get the new table. I am not geting the new table while running the query in VB.
Please help. Its urgent.
Thanks
Duraiappan
I use the following connection string:
CNSTR = "Provider=MSDASQL.1;" & _
"Persist Security Info=False;" & _
"Driver={Microsoft Visual FoxPro Driver};" & _
"SourceDB= " & SRC_DBF_FILE & ";" & _
"SourceType=DBF;Exclusive=No;" & _
"BackgroundFetch=Yes;Collate=General;Deleted=Yes"
cn1.Open CNSTR
And i have the following statements:
STR1 = "select * from exam where date>={^" &
Format(FROMDT, "yyyy/mm/dd") & "} and date<={^" &
Format(TODT, "yyyy/mm/dd") & "} INTO TABLE " &
TDEST_FOLDER & "EXAMNEW.dbf"
cn1.Execute STR1
When i run the statements i dont get the new DBF file EXAMNEW.DBF in the Tdest_folder.
I am not sure where i get the error. If i run the same query in visual foxpro i get the new table. I am not geting the new table while running the query in VB.
Please help. Its urgent.
Thanks
Duraiappan