not null statement

  • Thread starter Thread starter jonathandrott
  • Start date Start date
J

jonathandrott

i'm trying to find fields that don't have data by my constraints. this
is not working in vb2005.

Dim dbAdapter As Odbc.OdbcDataAdapter = New
Odbc.OdbcDataAdapter("select PLU_NUM from Inv_Info where
UNITS_INPUR_UNIT =0 and PURCH_PLU <> '' ", connDB)

its two single quotes with a double quote at the end.
 
i'm trying to find fields that don't have data by my constraints.
this is not working in vb2005.

Dim dbAdapter As Odbc.OdbcDataAdapter = New
Odbc.OdbcDataAdapter("select PLU_NUM from Inv_Info where
UNITS_INPUR_UNIT =0 and PURCH_PLU <> '' ", connDB)

its two single quotes with a double quote at the end.

Try replacing the PURCH_PLU <> '' with PURCH_PLU NOT IS NULL.
 
Please define "not working". And I mean be specific, what exceptions,
errors, etc. What you expect to happen and what does.

"not working" does not really tell us anything at all.
 
Your title seems in contradiction with your code.

Also vb2005 has nothing to do with it. see the SQL language of your
DBMS.

In vb: it would be System.Convert.DBNull. In sql usually you often
have ISNULL.

If you are checking for zero length string or spaces you may want to
use
some trim function made available by your sql to deal with spaces too.

Tommaso

(e-mail address removed) ha scritto:
 
Back
Top