How to call a stored procedure in an external MySQL DB?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
greg falda
Posts: 77
Joined: Thu Jan 15, 2015 6:51 pm
Location: Warsaw

How to call a stored procedure in an external MySQL DB?

Post by greg falda » Wed Jun 07, 2017 11:23 am

Dear All

Assume that I have connected from LiveCode to an external MySQL database using code like:

Code: Select all

-- connect to the database
put revOpenDatabase("MySQL", tDatabaseAddress, tDatabaseName, tDatabaseUser, tDatabasePassword) into tResult
as described in the lesson:
http://lessons.livecode.com/m/4071/l/70 ... l-database

Assume that the database has some stored procedures. How can I call such a MySQL stored procedure from LiveCode using this connection?

Please advise.

best
greg falda

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: How to call a stored procedure in an external MySQL DB?

Post by AxWald » Thu Jun 08, 2017 5:35 pm

Hi,

Code: Select all

   put "CALL `myStoredProcedure`;" into StrSQL
   get revdb_execute(myDBID,StrSQL)
Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

Post Reply

Return to “Talking LiveCode”