473,395 Members | 1,608 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,395 software developers and data experts.

Dataset and the empty rows

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
2 2037
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
6
by: Mike P | last post by:
I have written a simple web service that basically takes a value input by a user and returns a dataset with all related data found in a database. In my client app use this code to get the data...
3
by: martin | last post by:
Hi, I am having trouble determining if my dataset is empty. I have function that populates a dataset from a database and then retuens it. If the database contains no data then the dataset will...
6
by: Vik | last post by:
A dataset is saved in session state. Then the dataset is filled out with the new records using a dataadapter. It appears then that the dataset saved in session state contains the new records even...
5
by: Roy Lawson | last post by:
I am having no problems connecting to a DB, creating a DataAdapter, and creating a dataset...and connecting to the data. Using the builtin data objects to do all this. My only problem now is...
22
by: EMW | last post by:
Hi, I managed to create a SQL server database and a table in it. The table is empty and that brings me to my next chalenge: How can I get the info in the table in the dataset to go in an empty...
12
by: Graham Blandford | last post by:
Hi all, Would someone be able to tell me the most 'graceful' way of removing unwanted rows from a dataset based on a condition prior to update? OR, resetting the rows all to unchanged after they...
4
by: Al | last post by:
I have this scenario: 1. XML file with schema and data is created from SQL Server tables. XML file contains 6 tables, some of them have rows, some of them are empty. 2. XML file is given to the...
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.