IS [NOT] NULL predicate may be used only with simple columns.
Posted in 2006
A developer updating an Informix table from an ASP.NET DataGrid (VS 2003, Informix ODBC 2.90) hit "IS [NOT] NULL predicate may be used only with simple columns". The failing statement was the UPDATE auto-generated by .NET's CommandBuilder, whose WHERE clause contains optimistic-concurrency tests of the form ((? IS NULL AND col IS NULL) OR (col = ?)) — i.e. IS NULL applied to a parameter marker rather than a column. Replies questioned that construct, asked what Informix counts as a "simple column", and requested the table schema and a dbaccess test, but no answer or fix is recorded in the thread.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Connectivity: ODBC / JDBC / .NET, Clustering, Grid & MACH11
I am trying to update an Informix database through a datagrid in
ASP.NET (Vb.NET) and I am using commandbuilder to that .NET provides.
I am able to get the records and populate the dataset, edit them but
when I click update I get the following error:
ERROR [HY000] [Informix][Informix ODBC Driver][Informix]IS [NOT] NULL
predicate may be used only with simple columns.
I use ODBC Informix driver 2.90.
Here is the Update command created by .NET:
UPDATE dms_tms_queue SET whse_code = ? , ship_id = ? , pps_num = ? ,
cust_num = ? , ship_num = ? , cust_po_num = ? , ship_name = ? ,ship_address1 = ? , ship_address2 = ? , ship_address3 = ? , ship_city
= ? , ship_state = ? , ship_zip = ? , ship_cntry = ? , ship_phone = ?
, email_address = ? , payment_method = ? , ship_via_code = ? , memo_1
= ? , memo_2 = ? , memo_3 = ? , memo_4 = ? , memo_5 = ? , memo_6 = ? ,
memo_7 = ? , memo_8 = ? , memo_9 = ? , create_stamp = ? , create_user
= ? , ob_type = ? , ppd_coll = ? , transfer_num = ? , bo_num = ? WHERE
( (dms_tms_queue_id = ?) AND ((? IS NULL AND whse_code IS NULL) OR
(whse_code = ?)) AND ((? IS NULL AND ship_id IS NULL) OR (ship_id =
?)) AND ((? IS NULL AND pps_num IS NULL) OR (pps_num = ?)) AND ((? IS
NULL AND cust_num IS NULL) OR (cust_num = ?)) AND ((? IS NULL AND
ship_num IS NULL) OR (ship_num = ?)) AND ((? IS NULL AND cust_po_num
IS NULL) OR (cust_po_num = ?)) AND ((? IS NULL AND ship_name IS NULL)
OR (ship_name = ?)) AND ((? IS NULL AND ship_address1 IS NULL) OR
(ship_address1 = ?)) AND ((? IS NULL AND ship_address2 IS NULL) OR
(ship_address2 = ?)) AND ((? IS NULL AND ship_address3 IS NULL) OR
(ship_address3 = ?)) AND ((? IS NULL AND ship_city IS NULL) OR
(ship_city = ?)) AND ((? IS NULL AND ship_state IS NULL) OR
(ship_state = ?)) AND ((? IS NULL AND ship_zip IS NULL) OR (ship_zip =
?)) AND ((? IS NULL AND ship_cntry IS NULL) OR (ship_cntry = ?)) AND
((? IS NULL AND ship_phone IS NULL) OR (ship_phone = ?)) AND ((? IS
NULL AND email_address IS NULL) OR (email_address = ?)) AND ((? IS
NULL AND payment_method IS NULL) OR (payment_method = ?)) AND ((? IS
NULL AND ship_via_code IS NULL) OR (ship_via_code = ?)) AND ((? IS
NULL AND memo_1 IS NULL) OR (memo_1 = ?)) AND ((? IS NULL AND memo_2
IS NULL) OR (memo_2 = ?)) AND ((? IS NULL AND memo_3 IS NULL) OR
(memo_3 = ?)) AND ((? IS NULL AND memo_4 IS NULL) OR (memo_4 = ?)) AND
((? IS NULL AND memo_5 IS NULL) OR (memo_5 = ?)) AND ((? IS NULL AND
memo_6 IS NULL) OR (memo_6 = ?)) AND ((? IS NULL AND memo_7 IS NULL)
OR (memo_7 = ?)) AND ((? IS NULL AND memo_8 IS NULL) OR (memo_8 = ?))
AND ((? IS NULL AND memo_9 IS NULL) OR (memo_9 = ?)) AND ((? IS NULL
AND create_stamp IS NULL) OR (create_stamp = ?)) AND ((? IS NULL AND
create_user IS NULL) OR (create_user = ?)) AND ((? IS NULL AND ob_type
IS NULL) OR (ob_type = ?)) AND ((? IS NULL AND ppd_coll IS NULL) OR
(ppd_coll = ?)) AND ((? IS NULL AND transfer_num IS NULL) OR
(transfer_num = ?)) AND ((? IS NULL AND bo_num IS NULL) OR (bo_num =
?)) )
And here are the types of this table and all the information about the fields :
Serial
Char
Int
Int
Char
Char
Char
Char
Char
Char
Char
Char
Char
Char
Char
Char
Char
Smallint
Char
Char
Char
Char
Int
Int
Int
Decimal
Decimal
Decimal
Datetime
Char
Char
Char
Int
Smallint
What does that error mean and how can I fix it.
Please help
Thanks a lot.
((? IS NULL AND )... --^^ does not sound right... what are you planning to fill in for the ? Superboer.
ERROR [HY000] [Informix][Informix ODBC Driver][Informix]IS [NOT] NULL predicate may be used only with simple columns. This is the error I get when I try to update all the fields of the a table in Informix. I use Visual Studio 2003 to program ASP.NET pages. On 6 Apr 2006 23:18:41 -0700, Superboer <superboer7@t-online.de> wrote: > ((? IS NULL AND )... > --^^ > > does not sound right... > what are you planning to fill in for the ? > > Superboer. > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list >
I've run into the same thing - I'd be interested in some clarification on what exactly "simple" means too. Seems like I've tried this on built-in types and run into this before, so apparently "built-in" <> "simple". Gentian Hila wrote: > ERROR [HY000] [Informix][Informix ODBC Driver][Informix]IS [NOT] NULL > predicate may be used only with simple columns. > > This is the error I get when I try to update all the fields of the a > table in Informix. > > I use Visual Studio 2003 to program ASP.NET pages. > > On 6 Apr 2006 23:18:41 -0700, Superboer <superboer7@t-online.de> wrote: >> ((? IS NULL AND )... >> --^^ >> >> does not sound right... >> what are you planning to fill in for the ? >> >> Superboer. >> >> _______________________________________________ >> Informix-list mailing list >> Informix-list@iiug.org >> http://www.iiug.org/mailman/listinfo/informix-list >>
Good point. What is a so-called "simple colum" ? On 4/7/06, Matt Penning <mmpenning@yahoo.com> wrote: > I've run into the same thing - I'd be interested in some clarification > on what exactly "simple" means too. Seems like I've tried this on > built-in types and run into this before, so apparently "built-in" <> > "simple". > > > Gentian Hila wrote: > > ERROR [HY000] [Informix][Informix ODBC Driver][Informix]IS [NOT] NULL > > predicate may be used only with simple columns. > > > > This is the error I get when I try to update all the fields of the a > > table in Informix. > > > > I use Visual Studio 2003 to program ASP.NET pages. > > > > On 6 Apr 2006 23:18:41 -0700, Superboer <superboer7@t-online.de> wrote: > >> ((? IS NULL AND )... > >> --^^ > >> > >> does not sound right... > >> what are you planning to fill in for the ? > >> > >> Superboer. > >> > >> _______________________________________________ > >> Informix-list mailing list > >> Informix-list@iiug.org > >> http://www.iiug.org/mailman/listinfo/informix-list > >> > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list >
do you have the update statement you are trying to run and the schema
of the table its being run against?
Does the same update statement work OK if you use run it in dbaccess or
do you get the same error?
hmm most of it is there now
why did that not appear when I first looked
do you have the dbschema output for table dms_tms_queue