On 19-4-2013 9:26, Toru Takubo wrote:
> With analogical thinking, I expected that the following might work
> for TSQLQuery in FPC:
> 
> var
>   r,i: Integer;
>   DBQ: TSQLQuery;
> begin
> ...
>    DBQ.SQL.Text:='IncValue :@Param';
>    DBQ.Params.CreateParam(ftInteger,'@RETURN_VALUE',ptResult);
>    DBQ.Params.CreateParam(ftInteger,'@Param',ptInputOutput).AsInteger:=3;
>    DBQ.ExecSQL;
ExecSQL executes SQL and does not return a value.
Try DBQ.Open to return values. No idea if the mssqlconn connector
supports output parameters in SPs though; best to just try.

> I read fpc db tutorials and googled, but I could not find the answer for
> this specific issue. Would anyone have an idea which of the following
> is the truth?
Documentation:
http://www.freepascal.org/docs-html/fcl/sqldb/index.html
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to