Lacak2, your fix works well for me. Thank you!
but I have a question regarding this part which I guess it's for store procedure that will return multiple result sets:
@@ -470,7 +472,14 @@ begin
C.RowsAffected := mysql_affected_rows(FMYSQL);
C.LastInsertID := mysql_insert_id(FMYSQL);
if C.FNeedData then
- C.FRes:=mysql_store_result(FMySQL);
+ repeat
+ Res:=mysql_store_result(FMySQL); //returns a null pointer if the statement didn't return a result set
+ if Res<>nil then
+ begin
+ mysql_free_result(C.FRes);
+ C.FRes:=Res; <--- since C.FRes will be assigned a new result set each time in the loop, does it mean it will only contain the last result set?
+ end;
+ until mysql_next_result(FMySQL)<>0;
I'm a new user of lazarus, please forgive me if it's a silly question
