Re: Problem with coltype in syscolumns
Posted in 1995
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
In article <3s61oj$rp9@dale.goodeal.msk.su>, nvj@goodeal.msk.su (Vadim J. Nikitin) says: > Puru Balakrishnan (pbalakrishnan@symantec.com) wrote: : This query performed on db-access returns the correct results as: : colname coltype collength : field1 256 10 : field2 2 4 : A value greater than 256 indicates it does not allow nulls. : - The same query when performed from a client using ESQL/C yields: : colname coltype collength : field1 0 10 : field2 2 4 : As a result, I cannot figure out if the column allows null values. Check the type of "coltype" in your ESQL/C program. Maybe it's char ? WBR, Vadim J. Nikitin > I forgot to mention that I am using SQLDA instead of host variables. If I use host variables, I get the correct value. While using SQLDA, I set the sqltype in SQLVAR structure to CSHORTTYPE (short int) which corresponds to SQLSMINT (SmallInt). Puru Balakrishnan