473,503 Members | 3,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataView RowFilter

I have a dataset (called adset) which has a column called "Large" which is
either an integer 0 or 1.

I am creating 2 dataviews, one which should display the 1's and one which
should display the 0's using the following code:

DataView largeview = new DataView();
largeview.RowFilter = "Large=1";
largeview.Table = adSet1.Tables[0];
DataView smallview = new DataView();
smallview.RowFilter = "Large=0";
smallview.Table = adSet1.Tables[0];

but, for some reason, adSet, largeview, and smallview all have 8 rows.....
what am I doing wrong?
thnx
Nov 18 '05 #1
2 2281
try this..telling the dataview about the table you are using before the rowfilter

DataView largeview = new DataView(adSet1.Tables[0]);
largeview.RowFilter = "Large=1";

DataView smallview = new DataView(adSet1.Tables[0]);
smallview.RowFilter = "Large=0";

"Ryan Moore" <ry*******@hotmail.com> wrote in message news:ur**************@TK2MSFTNGP12.phx.gbl...
I have a dataset (called adset) which has a column called "Large" which is
either an integer 0 or 1.

I am creating 2 dataviews, one which should display the 1's and one which
should display the 0's using the following code:

DataView largeview = new DataView();
largeview.RowFilter = "Large=1";
largeview.Table = adSet1.Tables[0];
DataView smallview = new DataView();
smallview.RowFilter = "Large=0";
smallview.Table = adSet1.Tables[0];

but, for some reason, adSet, largeview, and smallview all have 8 rows.....
what am I doing wrong?
thnx

Nov 18 '05 #2
Still no-go
"Raterus" <ra*****@spam.org> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
try this..telling the dataview about the table you are using before the
rowfilter

DataView largeview = new DataView(adSet1.Tables[0]);
largeview.RowFilter = "Large=1";

DataView smallview = new DataView(adSet1.Tables[0]);
smallview.RowFilter = "Large=0";

"Ryan Moore" <ry*******@hotmail.com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
I have a dataset (called adset) which has a column called "Large" which is
either an integer 0 or 1.

I am creating 2 dataviews, one which should display the 1's and one which
should display the 0's using the following code:

DataView largeview = new DataView();
largeview.RowFilter = "Large=1";
largeview.Table = adSet1.Tables[0];
DataView smallview = new DataView();
smallview.RowFilter = "Large=0";
smallview.Table = adSet1.Tables[0];

but, for some reason, adSet, largeview, and smallview all have 8 rows.....
what am I doing wrong?
thnx

Nov 18 '05 #3

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

Similar topics

2
5966
by: vbnetrookie | last post by:
In the dataview rowfilter property, how can I say that I just want Titles that start with 'A' to 'J' ?? ex: dv.rowfilter = " Country = ' France ' " I want dv.rowfilter = " Title = (from...
2
3943
by: Top Gun | last post by:
I am trying to code for a compound conditional in the DataView.RowFilter but don't quite no how to do the correct syntax for this. The following code sample chokes on dv.RowFilter: int batchid...
4
522
by: Jim Heimer | last post by:
When I use the dataview.rowfilter and I try to display the field value of the first row, the code doesn't seem to show the first row AFTER the rowfilter. This is my code: DataView...
2
2871
by: David | last post by:
Hi, I use DataView to filter my record. But when I use: ls_filter += " and DATEPART(hh, CA103)=" + i ; mydv.RowFilter = ls_filter; I got error. How should I filter by hour using...
8
4765
by: KC | last post by:
For a DataView.Rowfilter can I use more than one expression? I want to filter out two different things. For example can I take: dv.RowFilter = "MTX <> 'Customer Forcast'" and ...
7
5603
by: Rich | last post by:
Hello, I am pulling master data from one master table and detail data from two detail tables. The rows from the master data are displayed in textboxes on my form which are bound to the data...
0
1480
by: neeraj | last post by:
Hi, all Could anny one give me help how can I use like operator with these data types "integer , datetime or boolean" in DataView.RowFilter Actually when I try to get the data from dataview...
2
18880
by: neeraj | last post by:
Hi, all Could anny one give me help how can I use like operator with these data types "integer , datetime or boolean" in DataView.RowFilter Actually when I try to get the data from dataview...
1
2688
by: AlexW | last post by:
Hi I am in the process of developing an inventory application in visual basic. I keep coming up against a problem with using the dataview.rowfilter property. Basically what happens is this: -a...
5
11807
by: AlexW | last post by:
Hi I am in the process of developing an inventory application in visual basic. I keep coming up against a problem with using the dataview.rowfilter property. Basically what happens is this: -a...
0
7192
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
7064
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
7315
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
5559
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,...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.