Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Though I pointed out what the error could be in your sql code, I would like to give more details on it. </p> <p><em><code>That Stored Procedure Runing at MySql WithOut any problems but when send Delphi parameters to sp , i get that Error !!</code></em> But you are wrong.</p> <p>There is <a href="http://bugs.mysql.com/bug.php?id=26394" rel="nofollow"><strong><em><code>a known bug</code></em></strong></a> in your procedure creation. Due to the reason a <em>runtime exception was raised</em>.<br> <em><code>Semantics of Stored procedure code is not checked at CREATE time. At runtime, undeclared variables are detected, and an error message is generated for each reference to an undeclared variable. However, SP's seem to believe any reference denotes a column, even though the syntactic context excludes that. This leads to a very confusing error message in case the procedure.</code></em></p> <p>A standard test example is as shown below: </p> <pre><code>mysql&gt; drop procedure proc_test; Query OK, 0 rows affected (0.00 sec) mysql&gt; delimiter // mysql&gt; CREATE PROCEDURE proc_test() -&gt; BEGIN -&gt; select current_day; -&gt; END -&gt; // Query OK, 0 rows affected (0.00 sec) </code></pre> <p>Here you can understand that procedure compilation ignored on what <code>current day</code> is.</p> <pre><code>mysql&gt; delimiter ; mysql&gt; call proc_test(); ERROR 1054 (42S22): Unknown column 'current_day' in 'field list' mysql&gt; </code></pre> <p>With this you should understand that <em><code>That Stored Procedure Runing at MySql WithOut any problems ...</code></em> is not correct. </p> <hr> <p>A quick fix to your query will resolve the issue. You mentioned that <em><code>I defined input parameters with _ prefix. I don't know waht i must do !</code></em>. If that is true, then<br> change </p> <pre><code>SELECT * FROM bimar WHERE `_code_ehda_konandeh` = `code_ehda_konandeh` </code></pre> <p>to</p> <pre><code>SELECT * FROM bimar WHERE `code_ehda_konandeh` = _code_ehda_konandeh </code></pre> <p>and it should be working. Here I assumed <code>code_ehda_konandeh</code> is a column of table <code>bimar</code> too.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload