Subject Re: [IBO] -804 SQLDA missing or incorrect version, incorrect number/type of variables
Author jarnilse
I used TIB_DSQL for sum and count, and when I needed to fetch a single row.
Was not aware of the exception if the returned rowset was empty.
I won't use it for row fetching.
I will follow your advice and use TIB_Cursor instead when doing selects like
this.

Thanks,
Jarle

----- Original Message -----
From: "Claudio Valderrama C." <cvalde@...>
To: <IBObjects@egroups.com>
Sent: Sunday, November 26, 2000 7:54 PM
Subject: RE: [IBO] -804 SQLDA missing or incorrect version, incorrect
number/type of variables


> > -----Original Message-----
> > From: jarnilse [mailto:jarnilse@...]
> > Sent: Viernes 24 de Noviembre de 2000 14:47
> > To: IBObjects@egroups.com
> >
> > 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
>
> Jarle, I thought initially that you were invoking an IB procedure from
your
> DSQL, but you're doing a simple select. However, the error is the same
than
> when invoking IB procedures multiple times.
> I regret I couldn't reproduce your case with TCP connections to my own
> machine; maybe I need a real remote server, not sure.
> However, I noticed you're misusing the TIB_DSQL component: its purpose is
> mainly for executing DML commands that don't return a record set and DDL
> commands. In your case, you should use a TIB_Cursor. You can use a
> TIB_Query, too, but for one record, it's overwhelming, so TIB_Cursor will
be
> more efficient.
> In your case, the TIB_DSQL component has two problems:
> - If you get zero records, you will have an exception "attempt to fetch
past
> last record in a record stream".
> - If you get more than one record (impossible in your case) you will get
> another exception.
> As I said, use TIB_Cursor or if you can't, use TIB_Query. I will let this
> issue here but I'm convinced that with some network conditions, the error
> comes from IB itself. Maybe someone with a real remote server machine can
> try.
>
> C.
>
>
>
>
>
>