Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Aug 17, 2018 2:50 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: MySQL plugin : stored procedures
PostPosted: Wed Jun 06, 2012 6:31 am 
Offline

Joined: Fri Sep 30, 2005 11:44 am
Posts: 72
Location: Antwerp, Belgium
Hi all,

I am able to use MySQL Stored Procedures which return one recordset in a db.SQLSelect statement without any problems.
But when I try to call a Stored Procedure from within a MySQLPreparedStatement, all my next SQL requests to the database are blocked and MySQL returns the following error:
Commands out of sync, you can't run this command now

Seems to my like the MySQLPreparedStatement blocks.

Is this a bug in the MySQL plugin? Or should MySQLPreparedStatements never be used in combination with Stored Procedures?

Thanks for any advice on this topic.


Top
 Profile  
Reply with quote  
 Post subject: Re: MySQL plugin : stored procedures
PostPosted: Wed Jun 06, 2012 11:22 am 
Offline

Joined: Fri Sep 30, 2005 11:44 am
Posts: 72
Location: Antwerp, Belgium
Correction: MySQL Stored Procedures don't work at all with the MySQL plugin. It doesn't work with MySQLPreparedStatement and it doesn't work with SQLSelect.
The first stored procedure works but then all the following queries to the DB return empty record sets and MySQL outputs:
Commands out of sync, you can't run this command now

Anyone any suggestions?


Top
 Profile  
Reply with quote  
 Post subject: Re: MySQL plugin : stored procedures
PostPosted: Tue Sep 11, 2012 3:00 pm 
Offline
User avatar

Joined: Mon Mar 15, 2010 2:35 pm
Posts: 50
Location: Central Illinois
Hello mbeaucourt,

Did you ever find out how to successfully call a Stored Procedure on MySQL from Real Studio? I'm needing to do the same thing and found your post while searching the forum.

Thanks.
BB

_________________
"He who is afraid to ask is ashamed of learning."
--Danish proverb

Real Studio Enterprise 2012 r1.2
OS X 10.8.2 Mountain Lion
MacBook Pro - Mid 2009
http://www.LazyGatorWeb.com


Top
 Profile  
Reply with quote  
 Post subject: Re: MySQL plugin : stored procedures
PostPosted: Tue Feb 26, 2013 9:52 am 
Offline

Joined: Sun Jan 28, 2007 2:38 pm
Posts: 231
Im an hard stopped on this same issue. I know this is an old thread, but I am posting here in the hope that you might have resolved it.

Any information at all would be useful.


Top
 Profile  
Reply with quote  
 Post subject: Re: MySQL plugin : stored procedures
PostPosted: Tue Mar 12, 2013 2:30 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
I have been able to run a MySQL Stored Procedure through a PreparedStatement. For me, I had a loop and I could only make the PreparedStatement once. In other circumstances I can can always call Prepare as many times as I need. Only with stored procedures does this seem to happen.

dim oPS as MySQLPreparedStatement = gDB.Prepare("CALL spUpdate(?)")
if gDB.error then
dim sError as string = gdb.ErrorMessage
break
end

oPS.BindType(0, MySQLPreparedStatement.MYSQL_TYPE_STRING)

for i as integer = 0 to arsNames.Ubound
oPS.Bind(0, arsNames(i))

oPS.SQLExecute

if gDB.error then
dim sError as string = gdb.ErrorMessage
break
end
next

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group