Hi all,
I am trying to execute some commands on a sql anywhere 5.0 database, but...
I get the following error:
"Error: Database command has not been succesfully prepared at line xx in clicked event ...."
here is some of the code:
sg_SQLStmnt =
"ALTER TABLE t_attach ADD battery_id varchar(5);"
//Connect to the database.
CONNECT USING NEW_DB;
st_status.text = "test1"
DECLARE fv_cursor DYNAMIC CURSOR FOR SQLSA;
IF NEW_DB.SQLCode=-1 THEN GOTO QLErr_FV1
PREPARE SQLSA FROM :sg_SQLStmnt;
IF NEW_DB.SQLCode=-1 THEN GOTO SQLErr_FV2
OPEN fv_cursor ;
IF NEW_DB.SQLCode=-1 THEN GOTO SQLErr_FV3
COMMIT;
CLOSE fv_cursor;
IF NEW_DB.SQLCode=-1 THEN GOTO SQLErr_FV4
It's throwing the error message at the 'Open' Cursor line
I am using pb6.0
hope i gave enough info,
TIA,
g
I am trying to execute some commands on a sql anywhere 5.0 database, but...
I get the following error:
"Error: Database command has not been succesfully prepared at line xx in clicked event ...."
here is some of the code:
sg_SQLStmnt =
"ALTER TABLE t_attach ADD battery_id varchar(5);"
//Connect to the database.
CONNECT USING NEW_DB;
st_status.text = "test1"
DECLARE fv_cursor DYNAMIC CURSOR FOR SQLSA;
IF NEW_DB.SQLCode=-1 THEN GOTO QLErr_FV1
PREPARE SQLSA FROM :sg_SQLStmnt;
IF NEW_DB.SQLCode=-1 THEN GOTO SQLErr_FV2
OPEN fv_cursor ;
IF NEW_DB.SQLCode=-1 THEN GOTO SQLErr_FV3
COMMIT;
CLOSE fv_cursor;
IF NEW_DB.SQLCode=-1 THEN GOTO SQLErr_FV4
It's throwing the error message at the 'Open' Cursor line
I am using pb6.0
hope i gave enough info,
TIA,
g