Dataset and the empty rows

  • Thread starter Thread starter Shum
  • Start date Start date
S

Shum

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..
??
 
Shum said:
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))".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top