Parameters in OraTable

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
cmtsau
Posts: 1
Joined: Sat 29 Mar 2008 02:39

Parameters in OraTable

Post by cmtsau » Sat 29 Mar 2008 03:04

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.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Mon 31 Mar 2008 12:38

“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?

Post Reply