473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

not null statement

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.

Aug 23 '06 #1
3 1877
jo***********@gmail.com wrote:
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.

--
Al Reid
Aug 23 '06 #2
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

jo***********@gmail.com ha scritto:
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.
Aug 23 '06 #3
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.

<jo***********@gmail.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.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.

Aug 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Boefje | last post by:
Hello, I need to get all records from a table where a for a given playerid no field enddate exists with value NULL. table player_team: id, playerid, startdate, enddate 1, ...
5
by: Roger Withnell | last post by:
I'm updating a record by opening a recordset, setting the fields and the updating it with objRS.Update. I need to set an image datatype to NULL. objRS("field") = NULL works for datatypes int...
1
by: Brody | last post by:
Hi. I remember using if statements with null in it. For example, at one point I used this: if (value == null) { value = "something"; } document.write(value)
3
by: iStrain | last post by:
Hiya. I'm _sure_ this is an FAQ, but Googling hasn't produced the answer in a way I can make sense out of. I know I should get this, but so far no way... I'm creating tables and doing queries in...
14
by: MuZZy | last post by:
Hi, Lately i've been (and still am) fixing some memory leaks problems in the project i just took over when i got this new job. Among the other issues i've noticed that for localy created objects...
2
by: Stuart | last post by:
Hi there I have a stored procedure on my SQL database that retrieves a wide range of values from about 5 different tables. My end point is to calculate the cost against each line of retrieved...
64
by: yossi.kreinin | last post by:
Hi! There is a system where 0x0 is a valid address, but 0xffffffff isn't. How can null pointers be treated by a compiler (besides the typical "solution" of still using 0x0 for "null")? -...
5
by: rengeek33 | last post by:
I am building a SQL statement for Oracle and need one part of it to read: , myvar = null, myvar2 = "1", myvar3 = "0", myvar4 = null, etc. I am constructing this string using the String...
3
by: TD | last post by:
I have an unbound form that adds and updates records to one table. I use an INSERT sql statment to add a new record and a UPDATE statement to update a record. I created a function named C2F to...
7
by: eddie.holder | last post by:
Hi ladies and gents. I'm hoping anyone will be able to help me in a small access problem I am having. Let me try to explain: I have a form with textboxes which I use as criteria for a query. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.