Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Running Stored Procedures

forums forums Running Stored Procedures

  • This topic is empty.
Viewing 6 reply threads
  • Author
    Posts
    • #9476
      mkdev
      Member

      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.

    • #20522
      Ritesh
      Member

      QUOTE(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:

      CODE
      call sp1(param1,param2)

      in the query editor.

      A GUI interface to do it will be implemented in one of the future version of SQLyog.

    • #20523
      peterlaursen
      Participant

      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.

    • #20524
      mkdev
      Member

      Does the stored procedure need to have something that signifys its an input parameter like the word IN or @ by each parameter?

    • #20525
      peterlaursen
      Participant

      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.) “

    • #20526
      timothy
      Member

      I'm trying to execute a stored procedure that does not require a parameter and returns results. However, SQLyog returns:

      CODE
      No 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?

    • #20527
      Ritesh
      Member

      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?

Viewing 6 reply threads
  • You must be logged in to reply to this topic.