By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,610 Members | 1,957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,610 IT Pros & Developers. It's quick & easy.

Dataset and the empty rows

P: n/a
Hi!
i have a question.. I'm filling a dataset from a table in which some
rows are empty, i dont want those empty records to be filled in the
dataset.. Does any one know how to restrict it to only non empty
records..
??

Apr 20 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Shum" <sh******@gmail.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
i have a question.. I'm filling a dataset from a table in which some
rows are empty, i dont want those empty records to be filled in the
dataset.. Does any one know how to restrict it to only non empty
records..
I assume that you are filling the dataset from a table in a database.
Therefore, you are sending a "Select..." statement to the database to get
the records that you are inserting into the dataset. The best way to avoid
certain records from being loaded is to specify a filter in the WHERE clause
of your SELECT statement. I don't know what you mean by "empty" records, but
if by "empty" you mean that all the fields are NULL, then your WHERE clause
would be "Where NOT (field1 IS NULL AND field2 IS NULL AND field3 IS NULL...
(repeat for all fields))".
Apr 20 '07 #2

P: n/a
This is exactly what i was looking for.... Thanks a bunch!
Alberto Poblacion wrote:
"Shum" <sh******@gmail.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
i have a question.. I'm filling a dataset from a table in which some
rows are empty, i dont want those empty records to be filled in the
dataset.. Does any one know how to restrict it to only non empty
records..

I assume that you are filling the dataset from a table in a database.
Therefore, you are sending a "Select..." statement to the database to get
the records that you are inserting into the dataset. The best way to avoid
certain records from being loaded is to specify a filter in the WHERE clause
of your SELECT statement. I don't know what you mean by "empty" records, but
if by "empty" you mean that all the fields are NULL, then your WHERE clause
would be "Where NOT (field1 IS NULL AND field2 IS NULL AND field3 IS NULL...
(repeat for all fields))".
Apr 20 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.