ODBC and Informix
Posted in 1997
Topics: Connectivity: ODBC / JDBC / .NET
I would like to use ODBC with our application, but was presented with the following problem: "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. This means we lose some power of the database. In particular we have to rely entirely on the application code to set the correct values for these columns. Where we wish to change the default values for some column we will have to change and recompile our code." Does anyone have a way around this, or this simply a fact of life with ODBC? Thanks in advance, Mary