Subject Re: strange error message with SQLDA
Author benedicte_asselin
> On 26 Apr 2005 at 18:58, benedicte_asselin wrote:
>
> >I found something strange in the DSQL engine, reporting an error
in a
> >strange way.
>
> Never mind, DSQL error reports always were misterious.
not very helpful ;(

> > if I feed the SQLDA structure telling: type=SQL_SHORT,
> >sqllen=4 and sqldata with a good pointer(i made an error giving a
32
> >bit rather than a 16 bit),
>
> At first, sqllen must be 2. Then pointer to 16 bit integer is
good.
>
> > the next field gets a "validation error for
> >column COL2, value "*** null ***" " the next field is itself well
> >crafted (with obviously a non-null value inside) and there is
really a
> >'not null' column constraint on it in the table declaration.
>
> Did you provide valid pointer for sqlind? And did this pointer
> point to variable with right value (0)?
I provided a NULL pointer (i.e. sqlda.sqlind=0) which is valid if
the type is SQL_TEXT (while it would not be with SQL_TEXT+1). The
doc states that the 'sqlind' is 'not used' so NULL should be the
better value.

I'll post a sample later.
Armel