473,394 Members | 1,812 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,394 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 1841
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.