473,507 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is wrong with this rowfilter statement?

dvPOIs.RowFilter = "(County='" & ddlCountyRegion.SelectedItem.Text & "' OR
Region='" & ddlCountyRegion.SelectedItem.Text & "')"

The objective is to allow the user to chose from one dropdownlist either a
county or region, then use rowfilter to display only the rows that have
either the county or region that was selected.

The current (above) string returns am empty list.

Thanks in advance for your help.
Nov 19 '05 #1
2 1076
Are you getting a runtime error or a logical error? Also, I am not sure if
your criteria should be within ( ). I usually use " " and then ' ' to
specify a value

E.g

dvPOIs.RowFilter = "Country = ' " & ddlCountryRegion.SelectedItem.Text & "
' Or ...

"Mark Sandfox" wrote:
dvPOIs.RowFilter = "(County='" & ddlCountyRegion.SelectedItem.Text & "' OR
Region='" & ddlCountyRegion.SelectedItem.Text & "')"

The objective is to allow the user to chose from one dropdownlist either a
county or region, then use rowfilter to display only the rows that have
either the county or region that was selected.

The current (above) string returns am empty list.

Thanks in advance for your help.

Nov 19 '05 #2
My Bad. Statement was sound.
"Mark Sandfox" <No****@NoSpam.com> wrote in message
news:We*****************@newssvr31.news.prodigy.co m...
dvPOIs.RowFilter = "(County='" & ddlCountyRegion.SelectedItem.Text & "' OR
Region='" & ddlCountyRegion.SelectedItem.Text & "')"

The objective is to allow the user to chose from one dropdownlist either a
county or region, then use rowfilter to display only the rows that have
either the county or region that was selected.

The current (above) string returns am empty list.

Thanks in advance for your help.

Nov 19 '05 #3

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

Similar topics

0
1211
by: LaoJ | last post by:
I defined three Dataviews for the same table to get different rows: They are : dvFather, dvMother and dvOther set Filter as follow: dvFather.Rowfilter="relationship = 'father' "...
2
4835
by: Andrew Mueller | last post by:
Hello, Since I cannot query a DataSet directly, and I would like to maintain it's data, how would I use an adapter (SqlDataAdapter or DataAdapter) to query this DataSet. Example: Could I? ...
1
1116
by: jensen bredal | last post by:
******************** DataTable SampleTable = new DataTable(); //DataAdapter fill code in here. DataColumn ExpressionColumn = new DataColumn("Indexer", typeof(System.Int32)); ...
1
911
by: Mike | last post by:
I have code that allows the user to filter out car models, such as Chevy PickUp, Chevy Truck, etc. by region. When i added code for the Chevy Cars and filter by region i'm still getting the Trucks...
2
2773
by: Liza | last post by:
Hi I have a problem gettting the right data in my CommandArgument after I applyed a rowfilter. My template column looks somewhat like this: <asp:TemplateColumn HeaderText="ErrorID">...
8
3870
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 =...
1
19070
by: Bill Nguyen | last post by:
Can I have more than 1 criteria for Dataview.Rowfilter? For example: Dataview.Rowfilter = "Column1 = " & Var1 & "AND colum2 = " & Var2 Thanks Bill
3
2028
by: Jan Nielsen | last post by:
Hi I am working with rowfilters in dataviews. I would like to filter for empty fields (= null value in the database) I found this sentence on msdn: **************** To return only those columns...
8
3245
by: Scott Emick | last post by:
I am using the following to compute distances between two lat/long coordinates for a store locator - (VB .NET 2003) it seems to take a long time to iterate through like 100-150 locations -...
0
7221
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
7109
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...
1
7029
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
7481
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5039
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
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3190
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
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
411
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.