Subject Re: [firebird-support] Re: describe_bind
Author Dimitry Sibiryakov
On 19 Aug 2004 at 14:01, blahclayton wrote:

>However when I set the null indicator (sqlda->sqlvar[i].sqlind) to -
>1, i get the error again (-804 - An error was found in application
>input parameters for the SQL statement!!).

Some more mistakes.

>
>e.g.
>
>unsigned int nSize = 1;
>short nullid = 0;
>XSQLDA* sqlda = (XSQLDA *) malloc(XSQLDA_LENGTH(nSize));;
>sqlda->version = 1;
>sqlda->sqld = nSize;
>sqlda->sqln = nSize;
>char* text = NULL;
>for(unsigned int i = 0; i < nSize; i++)
>{
>
>
> if(text != NULL)
> {
> nullid = -1;
Should be 0 there.
> sqlda->sqlvar[i].sqllen = strlen(text);
> }
else
{
nullid = -1;
}
> // sets up each parameter
> sqlda->sqlvar[i].sqldata = text;
> sqlda->sqlvar[i].sqltype = SQL_TEXT;
> sqlda->sqlvar[i].sqlind = &nullid;
>}

SY, Dimitry Sibiryakov.