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

Christof Thalhofer chrisml at deganius.de
Sat Feb 18 12:52:15 CET 2023

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:

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

Dies ist keine Signatur

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230218/39aa797d/attachment.sig>

More information about the User mailing list