Re: ODBC and Informix
Posted in 1997
In article <5ij7vq$5u7@cssun.mathcs.emory.edu>, informix@interval-intl.com says... > "In our database we have columns defined as NOT NULL but with a default > value (e.g., modified_date column NOT NULL with a default of 'current'). > ODBC in these cases only sees the NOT NULL restriction. It does not give > the DB the opportunity to apply the default value but instead immediately > fails the SQL. Even worse, it does not always return an error, therefore > our application code does not detect the condition. What ODBC drivers are you using, and in what context? (Visual Basic? Delphi? Optima++? JDBC-ODBC bridge?) This is up to the ODBC driver being used. I find it hard to believe that a reasonable ODBC driver would interpret an SQL statement to impose this kind of restriction between the database and your application. I seriously doubt that, say, Openlink (which prides themselves on efficiency and driver efficiency) does this. The ODBC driver I've been a part of does not impose any such restrictions. You don't say anything about the environment in which you're developing your application, but the environment may be the cause of the problem. Visual Basic, to name one that I know about, can mangle your simple SQL statement beyond your wildest dreams. -- William Harris