- This topic is empty.
-
AuthorPosts
-
-
February 11, 2006 at 12:56 am #9476mkdevMember
I just recently pulled down the latest version of SQLyog and I have at least version 5.0 of mySQL where you can use stored procedures.
I have a question about running stored procedures in SQLyog. Is there a way to run one that has parameters passed into it?
I am trying to test my stored procedure to see if it will return a result set and have not been successful in finding where to run it at or inputing my parameters to it. When I right click on the Object I get options of Create, Alter, Delete, etc.
I also clicked on the green arrows and that didnt return anything or give an option to input any values.
Any help would be greatly appreciated.
-
February 11, 2006 at 8:52 am #20522RiteshMemberQUOTE(mkdev @ Feb 11 2006, 12:56 AM)I have a question about running stored procedures in SQLyog. Is there a way to run one that has parameters passed into it?[snapback]8712[/snapback]
You will need to execute a query like:
CODEcall sp1(param1,param2)in the query editor.
A GUI interface to do it will be implemented in one of the future version of SQLyog.
-
February 11, 2006 at 10:35 am #20523peterlaursenParticipant
Also note that when you have entered the SQL defining the SP in an editor tab, that SQL must be executed to establish the SP with the database. Now you can call() it.
-
February 13, 2006 at 2:11 pm #20524mkdevMember
Does the stored procedure need to have something that signifys its an input parameter like the word IN or @ by each parameter?
-
February 13, 2006 at 2:40 pm #20525peterlaursenParticipant
MySQL docs at http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html
“The parameter list enclosed within parentheses must always be present. If there are no parameters, an empty parameter list of () should be used. Each parameter is an IN parameter by default. To specify otherwise for a parameter, use the keyword OUT or INOUT before the parameter name.
Note: Specifying a parameter as IN, OUT, or INOUT is valid only for a PROCEDURE. (FUNCTION parameters are always regarded as IN parameters.) “
-
March 11, 2006 at 12:33 am #20526timothyMember
I'm trying to execute a stored procedure that does not require a parameter and returns results. However, SQLyog returns:
CODENo query(s) were executed. Please enter a query in the SQL window or place the cursor inside a query.MySQL Query Browser returns the results correctly. What is wrong with SQLyog?
-
March 11, 2006 at 5:39 am #20527RiteshMember
Where are you placing the cursor when you press F5? I think you are placing the cursor outside the query and thus SQLyog throws up the error.
It might be a bug with SQLyog too. Can you attach a screenshot with the cursor position?
-
-
AuthorPosts
- You must be logged in to reply to this topic.