<div dir="ltr"><div>Hello Toru,<br></div><div><br></div><div>Not sure if it works with SQLdb or ADO, but it has been working for some other tasks that I've been involved with (not FPC, but delphi based, though).</div><div>
<br></div><div>You can have the result as through the select statement.</div><div>Have a TSQLQuery to run the following query:</div><div><br></div><div>SET NOCOUNT ON</div><div>declare @var1 int; -- whatever type of the out parameter you need.</div>
<div>exec YourStoredProc @outvar = @var1 output</div><div>select @var1 as var1</div><div><br></div><div>then</div><div>var q: TSQLQuery;</div><div> i:integer;</div><div>...</div><div>q.Active:=true;</div><div>if not q.eof then </div>
<div> i:=q.FieldsByName('var1').asInteger;</div><div><br></div><div class="gmail_extra">Hope that helps.</div><div class="gmail_extra"><br></div><div class="gmail_extra">thanks,</div><div class="gmail_extra">Dmitry<br>
<br><div class="gmail_quote">On Wed, Apr 17, 2013 at 11:45 PM, Toru Takubo <span dir="ltr"><<a href="mailto:takubo@e-parcel.co.jp" target="_blank">takubo@e-parcel.co.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
I have an application build with Delphi7+ADO connecting<br>
to MSSQL database, and planning to migrate to FPC+SQLdb.<br>
<br>
It has many stored procedures which have OUT parameters<br>
to retrieve value from database. I am trying to migrate<br>
by using TMSSQLConnection+TSQLQuery, but still I can not<br>
settle it. I can execute and pass values to stored procedures,<br>
but not the other way. The RETURN_VALUE (default result)<br>
can not be retrieved either.<br>
<br>
I would appreciate any advice.<br>
<br>
Toru<br>
<br>
<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</blockquote></div><br></div></div>