Subject Re: [IBO] TIB_DSQL???
Author Helen Borrie
At 10:59 AM 29-03-01 +0000, you wrote:
>the code that I'm using is this.
>
>
>String myString = "Simon";
>TIB_DSQL *Dsql = new TIB_DSQL(Application);
>Dsql->IB_Connection = Connection;
>Dsql->IB_Transaction = Transaction;
>Transaction1->StartTransaction ();
>Dsql->BeginBusy(true);
>Dsgl->SQL->Text = "execute procedure myproc(:Ret)";
>//Where ret is a varchar(20)
>Dsql->Prepare();
>Dsql->ParamByName("Ret" )->AsString = myString;
>Dsql->Execute();
>Transaction1->Commit();
>Dsql->EndBusy();
>delete Transaction;
>delete Dsql;
>
>
>And a warning message is shown "Simon is not an valid integer value"
>and then is the program killed.
>
>Any ideas?????
> Dsql->SQL->Text = "EXECUTE PROCEDURE SetL
>(:FromNodeCode, :ToNodeCode, :LUTypeCode, :Ret,"
> " :ModeCode, :NumberOfUnits, :CUGCode, :CLCode, :LUCatCode, :Fr
>omX,"
> " :FromY, :ToX, :ToY)";
>
> Dsql->Prepare();

The procedure is expecting 13 input parameters, of which the first (FromNodeCode) is integer. You called it with one parameter, a string. It aint gonna work. It must be called with all of its input parameters, in the correct order, and it will always barf on a data type mismatch.

Cheers,
Helen

All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________