Errors with nulls thru ODBC

From: "Johann Zuschlag" <zuschlag2(at)online(dot)de>
To: "pgsql-odbc" <pgsql-odbc(at)postgresql(dot)org>
Subject: Errors with nulls thru ODBC
Date: 2001-12-06 23:56:33
Message-ID: 005101c17eb1$a2bb2750$c53801d9@GrenzlandNB
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

I found a funny behavior using psqlodbc (07.01.0009) with PostgeSQL 7.1.3. An application shows eratic results in columns with smallint and int when there is no value defined, i.e. null, unknown. Sometimes I get a 1, 3, 5, 0, or nothing (smallint).

The app is just doing a simple SELECT. There is no =null or similiar. I went thru all mails concerning null, isnull etc. I guess the problem is with the driver, not with postgreSQL. If I compare the same app with MSSQL I get the correct results, i.e. nothing. ;-)

Maybe the app is not well programmed. But why does it work with MSSQL? In the MS-ODBC driver there is a tag at ANSI-NULLS. So what? It should behave same.

Ok, for sure I can solve it with a default value. But I have to go thru more than 100 tables with up to 50 columns.

Maybe there is a simple answer for that. Any ideas? How does the driver report back nulls?

regards

Johann Zuschlag

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Hiroshi Inoue 2001-12-07 01:01:52 Re: Errors with nulls thru ODBC
Previous Message Mike Miller 2001-12-06 22:47:18 Trouble with LargeObjects and ODBC, backend crash?