Now PB DBF directory via the ODBC connection, also want to use the grammar to create a table above 2
ODBC_FOX=Create transaction
ODBC_FOX. DBMS="ODBC"
ODBC_FOX. The AutoCommit=False
ODBC_FOX. DBParm=gs_dbparm_fox
Disconnect the Using ODBC_FOX;
Connect Using ODBC_FOX;
If ODBC_FOX. Sqlcode=1 Then
MessageBox (" message ", "unable to connect to the database! Error message: ~ r "+ ODBC_FOX sqlerrtext, StopSign!)
The Return - 1
End the If
String ls_sql, ls_err
Ls_sql="select * from bb into table aa"
ODBC_FOX. The AutoCommit=TRUE
The EXECUTE IMMEDIATE: ls_sql Using ODBC_FOX;
If ODBC_FOX. Sqlcode<0 Then
Ls_err=string (ODBC_FOX Sqlcode) + ";" + ODBC_FOX. Sqlerrtext
Messagebox (' error message ', "an error occurred when the delete! ~ n "+ ls_err, stopsign!)
The Return - 1
End the If
Commit the using ODBC_FOX;
ODBC_FOX. The AutoCommit=False
To create is not successful, which ace to give directions, thank you very much
CodePudding user response:
String ls_sql, ls_errLs_sql="select * from bb into table aa"
ODBC_FOX. The AutoCommit=TRUE
The EXECUTE IMMEDIATE: ls_sql Using ODBC_FOX;
If ODBC_FOX. Sqlcode<0 Then
Ls_err=string (ODBC_FOX Sqlcode) + ";" + ODBC_FOX. Sqlerrtext
Messagebox (' error message ', "an error occurred when the delete! ~ n "+ ls_err, stopsign!)
The Return - 1
End the If
Commit the using ODBC_FOX;
ODBC_FOX. The AutoCommit=False
This in which database will not be successful execution
CodePudding user response:
Select * from bb into table aaShould be
Insert into aa the select * from bb