473,326 Members | 2,126 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,326 software developers and data experts.

RowFilter of Dataview object ???

Dear all,

I am using a dataview windows application object
Form that I need to set the RowFilter property in order to view data based
on two different columns values.

Querry string is as follow :

m_sSeverityFilter = m_dsHist.Tables(0).Columns(4).ColumnName & " = " & "'" &
cbSeverity.Text & "'"

m_sCommentFilter = m_dsHist.Tables(0).Columns(6).ColumnName & " <>''" (need
to filter here column fileds which are not null or empty string)

Base on that it works fine as long as I work only one of those criteria but
as soon as I used both condions I get a sythax error that I could not pointed
out why

DataView.RowFilter =m_sCommentFilter & "," & m_sCommentFilter

ANy ideas where is the error?

thnaks for your help
regards
serge
Jul 21 '05 #1
2 1839
You can test for null conditions using the following
http://www.knowdotnet.com/articles/a...rowfilter.html

and you can test for multiple conditiions using AND. IF it's blowing up you
probably just have an extra ' somewhere

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"serge calderara" <se************@discussions.microsoft.com> wrote in
message news:32**********************************@microsof t.com...
Dear all,

I am using a dataview windows application object
Form that I need to set the RowFilter property in order to view data based
on two different columns values.

Querry string is as follow :

m_sSeverityFilter = m_dsHist.Tables(0).Columns(4).ColumnName & " = " & "'" & cbSeverity.Text & "'"

m_sCommentFilter = m_dsHist.Tables(0).Columns(6).ColumnName & " <>''" (need to filter here column fileds which are not null or empty string)

Base on that it works fine as long as I work only one of those criteria but as soon as I used both condions I get a sythax error that I could not pointed out why

DataView.RowFilter =m_sCommentFilter & "," & m_sCommentFilter

ANy ideas where is the error?

thnaks for your help
regards
serge

Jul 21 '05 #2
Serge,

As Bill told do you have to use the AND (and not the &).
As well is this filter one continuous string and not two strings.

I hope this helps,

Cor
Jul 21 '05 #3

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

Similar topics

2
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...
1
by: iCeCLoW | last post by:
Hi there, I´m using the rowFilter property for filtering the rows in a DataView object. If the filter is set to an inexistent value , that is, after filtering i have 0 rows in the DataView,...
2
by: Ryan Moore | last post by:
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...
8
by: Dave Hagerich | last post by:
I'm using a DataGrid with a DataSet and I'm trying to filter the data being displayed, using the following code as a test: DataView theView = new DataView(theDataSet.Tables); theView.RowFilter =...
8
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 ...
5
by: Gene Ariani | last post by:
Is there a limit to how big a rowfilter on dataview could be? my rowfilter is dynamically generated and if its get too big I get a stackoverflow error other wise it works fine. Any direction is...
7
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
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
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
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.