SQLDA Structure For C

The SQLDA structure is provided in the file sqlca.h. Include this file in all C programs that make use of dynamic SQL.

#ifndef SQLDASIZE
struct sqlda
{
  unsigned char  sqldaid[8];
  long      sqldabc;
  short      sqln;
  short      sqld;
  struct sqlvar
  {
    short      sqltype;
    short      sqllen;
    unsigned char    *sqldata;
    short      *sqlind;
    struct sqlname
    {
      short      length;
      unsigned char    data[30];
    } sqlname;
  } sqlvar[1];
};
#define SQLDASIZE(n) (sizeof(struct sqlda)+
      (n-1)*sizeof(struct sqlvar))
#endif