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

Home Posts Topics Members FAQ

What is wrong with this rowfilter statement?

dvPOIs.RowFilte r = "(County='" & ddlCountyRegion .SelectedItem.T ext & "' OR
Region='" & ddlCountyRegion .SelectedItem.T ext & "')"

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 1083
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.RowFilte r = "Country = ' " & ddlCountryRegio n.SelectedItem. Text & "
' Or ...

"Mark Sandfox" wrote:
dvPOIs.RowFilte r = "(County='" & ddlCountyRegion .SelectedItem.T ext & "' OR
Region='" & ddlCountyRegion .SelectedItem.T ext & "')"

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******** *********@newss vr31.news.prodi gy.com...
dvPOIs.RowFilte r = "(County='" & ddlCountyRegion .SelectedItem.T ext & "' OR
Region='" & ddlCountyRegion .SelectedItem.T ext & "')"

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
1225
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' " dvMother.Rowfilter = "relationship = 'mother' " for the third one, the relationship can be "sister, brother, ... so, I wrote: dvOther.rowfilter="relationship<>'father' " AND "relationship = 'mother' " It get run time error"cast from string "relatiobship...
2
4841
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? SqlDataAdapter adapter = new SqlDataAdapter();
1
1123
by: jensen bredal | last post by:
******************** DataTable SampleTable = new DataTable(); //DataAdapter fill code in here. DataColumn ExpressionColumn = new DataColumn("Indexer", typeof(System.Int32)); ExpressionColumn.AutoIncrement = true;
1
920
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 and Pickups in that region. How can i only get teh Cars, for the selected region? Code: with dvCars 'dataview .Table = dsCars.tables(0) .RowFilter = "(Make =" & selCars & "'" & ") AND (Region=" & "'" & selRegion & "'" )"
2
2777
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"> <HeaderStyle Width="30%" CssClass="folderHeader"></HeaderStyle> <ItemTemplate>
8
3889
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 = "'Record ID' = '0'"; theView.RowStateFilter = DataViewRowState.ModifiedCurrent; Debug.WriteLine(string.Format("RowFilter = {0}", theView.RowFilter)); RecordDataGrid.DataSource = theView; RecordDataGrid.DataBind();
1
19086
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
2035
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 with null values, use the following expression: "Isnull(Col1,'Null Column') = 'Null Column'" *************************' So I tried like this: mainDataSource.RowFilter = "Gender = 'male' and " & "Isnull(floor,'Null
8
3260
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 - about 10-15 seconds...I want to make the code faster. I changed it to be multi-threaded, and it doesn't really make it any faster. The bottleneck seems to be with the math computations. Any ideas like changing my data types or other ideas etc would...
0
8440
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8355
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8638
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7381
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5662
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2769
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2006
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1769
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.