|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
not null statementi'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. jonathandr***@gmail.com wrote:
> i'm trying to find fields that don't have data by my constraints. Try replacing the PURCH_PLU <> '' with PURCH_PLU NOT IS NULL.> 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. -- Al Reid 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. <jonathandr***@gmail.com> wrote in message Show quoteHide quote news:1156344313.705237.209360@74g2000cwt.googlegroups.com... > 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. > 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 jonathandr***@gmail.com ha scritto: Show quoteHide quote > 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.
Codesmith vs. Hand coding
Converting VB6 Structures to .NET Problem using default xml namespace and selectsignlenode/selectnod Reading specified format text from text file How to open a text file only through my application but not others? IE clone. Any good pointer ? Currency issue Implementing an interface? Printing in VB.Net combobox on form load |
|||||||||||||||||||||||