Page 1 of 1

Parameters in OraTable

Posted: Sat 29 Mar 2008 03:04
by cmtsau
Dear Sir,

We bought OraDirect few months ago, and very impressed by its performance. We are trying to re-program our old program in OraDirect.

I tried to set some parameters in OraTable like what below,

SELECT * FROM TABLE1 WHERE COMPANYNAME IS NOT NULL AND (CUSTOMERID = : ID OR :ID1 IS NULL)

If users type customerid in program, then :ID/:ID1 will have value, we will have data that companyname is not null and some specific customerid.

if users do not enter customerid, I would like to select data that only companyname is not null.

I tried to feed "NULL" or "DBnull.value" into :ID and :ID1, but it does not work.

May I ask what value should I feed into paramaters, if just need NULL in SQL statement ?

Thanks a lot.

Posted: Mon 31 Mar 2008 12:38
by Alexey.mdr
“Null” should be fine.
What exception did you get?
Probably you cannot insert NULLs into a particular column?
Could you post some code and the table definition script?