Re: Dataset and the empty rows
- From: "Alberto Poblacion" <earthling-quitaestoparacontestar@xxxxxxxxxxxxx>
- Date: Fri, 20 Apr 2007 11:11:52 +0200
"Shum" <shumyl21@xxxxxxxxx> wrote in message news:1177059602.509397.271270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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))".
.
- Follow-Ups:
- Re: Dataset and the empty rows
- From: Shum
- Re: Dataset and the empty rows
- References:
- Dataset and the empty rows
- From: Shum
- Dataset and the empty rows
- Prev by Date: Re: An IEquatable<T> object cast to IEquatable<explicittype> results in wrong Equals override called.
- Next by Date: Active Directory query doesn't work...
- Previous by thread: Dataset and the empty rows
- Next by thread: Re: Dataset and the empty rows
- Index(es):
Relevant Pages
|