Subject Re: [IBO] -804 SQLDA missing or incorrect version, incorrect number/type of variables
Author jarnilse
Sorry. Did not answer your question.
My sql for TIB_DSQL in the code is

for TIB_DSQL
select NETW_NAME, NETW_INSTALLED, NETW_REINSTALL
from T_NETWORK
where NETW_NETWORK = :NETW_NETWORK

and for TIBOQuery
select NETW_NETWORK, NETW_NAME, NETW_INSTALLED, NETW_REINSTALL
from T_NETWORK
where NETW_NETWORK = :NETW_NETWORK

NETW_NETWORK is a primary key. Both will return a single record.

-Jarle

----- Original Message -----
From: "Svein Erling Tysvær" <svein.erling.tysvaer@...>
To: <IBObjects@egroups.com>
Sent: Friday, November 24, 2000 12:18 AM
Subject: Re: [IBO] -804 SQLDA missing or incorrect version, incorrect
number/type of variables


Jarle,

what's your SQL like?

Set

At 09:11 24.11.2000 -0800, you wrote:
>forgot...
>It works alright when I substitute TIB_DSQL whith TIBOQuery.
>NetwDS is now a TIBOQuery.
>
> if (not Assigned(netw)) or (Integer(netw.Data) <>
>DlItmCR['DLITM_NETWORK']) then begin
> { NetwDS.Prepared then NetwDS.Unprepare; }
> { NetwDS.Prepare }
> NetwDS.Close;
>
>NetwDS.Params.ParamValues['NETW_NETWORK']:=DlItmCR['DLITM_NETWORK'];
> NetwDS.Open;
> netw:=pTmSchTN.AddChildObject(tmsch, NetwDS['NETW_NAME'],
> Pointer(DlItmCR.FieldByName('DLITM_NETWORK').AsInteger));
> netw.ImageIndex:=GetNetworkImageIndex(NetwDS);
> end;
>
>-Jarle
>
>----- Original Message -----
>From: "Svein Erling Tysvær" <svein.erling.tysvaer@...>
>To: <IBObjects@egroups.com>
>Sent: Thursday, November 23, 2000 11:42 PM
>Subject: Re: [IBO] -804 SQLDA missing or incorrect version, incorrect
>number/type of variables
>
>
>> Why unprepare before setting active to false?? I think this sequence
seems
>> more logical
>>
>> NetwDS.Active:=False;
>> if NetwDS.Prepared then NetwDS.Unprepare; file://I expect you have an
if
>here
>> NetwDS.Prepare;
>>
>> HTH,
>> Set
>>
>> At 22:13 23.11.2000 -0800, you wrote:
>> >I use:
>> >IBO 3.6.Bd
>> >Omnibook, nt 2000 proffesional client.
>> >nt 2000 server
>> >Interbase 5.6 on both, 5.6 client and server on the client.
>> >
>> >I develop on the client. The application and database.gdb was copied to
>the
>> >server.
>> >The database contained ground data. The application running on the
server
>> >fetches
>> >data from external equipment (not computers), and posts it to the
>database.
>> >All works find on the server. It same application works alright on the
>> >client when connected to the original database, i.e. local.
>> >
>> >When the client is connected to the server, and fetch data from the
>server I
>> >sometimes recieve this exception:
>> >ISC ERROR CODE:335544569
>> >
>> >ISC ERROR MESSAGE:
>> >Dynamic SQL Error
>> >SQL error code = -804
>> >SQLDA missing or incorrect version, or incorrct number/type of variables
>> >
>> >The problem was located to a procedure which builds a tree. The
following
>> >code fragment causes the
>> >exception when NetwDS.Execute is evaluated/executesd.
>> >NetwDS is a TIB_DSQL and DlItmCR is a TIB_Cursor.
>> >The Netw.DS and DlItmCR is prepared and unprepared in a try finally end
>> >block.
>> >If I uncomment lines 2 and 3 the exception will not fire, and the
>> >application will function when the client
>> >is connected to the server. This is not necassery when application and
>> >database is on the same machine.
>> >Why?
>> >
>> > if (not Assigned(netw)) or (Integer(netw.Data) <>
>> >DlItmCR['DLITM_NETWORK']) then begin
>> > { NetwDS.Prepared then NetwDS.Unprepare; }
>> > { NetwDS.Prepare; }
>> > NetwDS.Active:=False;
>> >
>> >NetwDS.Params.ParamValues['NETW_NETWORK']:=DlItmCR['DLITM_NETWORK'];
>> > NetwDS.Execute;
>> > netw:=pTmSchTN.AddChildObject(tmsch, NetwDS['NETW_NAME'], //
>tmsch
>> >and netw are treenodes
>> >
Pointer(DlItmCR.FieldByName('DLITM_NETWORK').AsInteger));
>> > netw.ImageIndex:=GetNetworkImageIndex(NetwDS);
>> > end;
>> >
>> >Any suggestions ?
>> >
>> >-- Jarle
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>>
>>
>>
>
>
>
>
>
>