|
| [WM20 (android - Mysql)] Bug in SQLExec() with webservice |
| Iniciado por guest, 29,jul. 2015 14:30 - 1 respuesta |
| |
| | | |
|
| |
| Publicado el 29,julio 2015 - 14:30 |
This problem only occured in batch script . for example , i made typo when i suppose to insert into tableA , i type tableB which is not exist.
------------------------------------------------------------ example 1
M_sql is string = [ delete from tableA where col1 = 1 ;
insert into tableB (col1, col2) values (1, 'BBB');
SELECT ROW_COUNT() ; ]
IF SQLExec(M_sql, M_QRY) = False THEN SQLInfo() Info("Error SQLExec " , SQL.MesError) END
----------------------------------------------------------------------- example 2
M_sql is string = [ insert into tableB (col1, col2) values (1, 'BBB');
SELECT ROW_COUNT() ; ]
IF SQLExec(M_sql, M_QRY) = False THEN SQLInfo() Info("Error SQLExec " , SQL.MesError) END
========================================================
if tableB is not exist
example1 , SQLExec() will still return true while example2 , SQLExec () will return false.
how come? this is because SQLExec() return true/false of execution of the first script in the batch which in example1 is "delete from tableA where col1 = 1 ;"
Solution? if you really need to run batch script , the solution is to create stored procedure . |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 123 mensajes |
|
| Publicado el 29,julio 2015 - 17:10 |
Hello ccc2. it would be nice if you had a name ....
First I suggest that you run a sentence at a time, do not place all in one.
Secondly I had problems with the result (True or False) and I corrected with the latest version 20 ..
-- Atte. Willian Fernando Best Regards Willian Fernando |
| |
| |
| | | |
|
| | | | |
| | |
|