[Gambas-user] Doing query of Stored procedure with no related data crashes gambas

Gianluigi gradobag at gradobag.it
Sat Feb 18 14:00:17 CET 2023

Il 18/02/23 12:52, Christof Thalhofer ha scritto:
> Am 18.02.23 um 12:10 schrieb Gianluigi:
>>>> Even if I use "TRY" eg.
>>>> Try res = $qrScanCon.Exec("CALL spGetTransByTraceId('" & sIndex & 
>>>> "')")
>>>>     If res And If res.Available Then
>>>> Gambas never returns the result even if the stored procedure gets 
>>>> data later
>>>> on
>>>> I am using development version (gambas daily ppa)
>> Hi Safiur,
>> I am unfamiliar with MySQL but I know that CALL is not part of SQL:
>> https://www.w3schools.com/sql/sql_ref_keywords.asp
>> Perhaps you should look for another way to query the database
> CALL is a valid Mysql command:
> https://dev.mysql.com/doc/refman/8.0/en/call.html
> Gambas 'Connection.Exec(Value)' passes the content of 'Value' to the 
> database to execute it. It does this irrelevant if 'Value' contains 
> SQL or not. If it is an illegal command the DB should throw an error 
> and Gambas should also throw an error but must not crash.
> Alles Gute
> Christof Thalhofer

I probably misunderstood, I intended the query to return an error and 
that it was not a segmentation error.
Evidently I didn't understand what is written here either:

Perhaps it should be better specified


More information about the User mailing list