Subject Re: [IBO] Problem with stored procedures: ISC ERROR MESSAGE:message length error (encountered 0, expected 8)
Author Helen Borrie (TeamIBO)
At 05:50 PM 12-08-02 +0200, you wrote:
>Dear Jason.
>
>Please if you could help. My messages just don't want to appear on the
>newsgroup.
>
>The problem I tried to post is as follows.
>
>Error message now while stored procedure is executed.
>
>function TPraxData.GetNewID(const aTable: String): Integer;
>begin
>{ call the stored procedure to get a new ID }
>PROCGETNEWID.ParamByName('TABLENAME').AsString := AnsiUpperCase(aTable);
>PROCGETNEWID.ExecProc;

Next line is the cause of the problem:

>Result := PROCGETNEWID.ParamByName('NEW_ID').AsInteger;
>end;

Should be
Result := PROCGETNEWID.FieldByName('NEW_ID').AsInteger;
end;
Stored procs use the Params[] array for input parameters and the Fields[]
array for output parameters.


>when this call is executed :: PROCGETNEWID.ExecProc;
>I get the following error:
>ISC ERROR CODE:335544358
>
>ISC ERROR MESSAGE:
>message length error (encountered 0, expected 8)

regards,
Helen Borrie (TeamIBO Support)

** Please don't email your support questions privately **
Ask on the list and everyone benefits
Don't forget the IB Objects online FAQ - link from any page at
www.ibobjects.com