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

Filtering Dataview [Strange Problem]

Abstract: I want to filter a dataview with a value where column name
have a SPACE.
Description:-
I bind a dataview to a datagrid,
The query which is fetching the results in Dataset is something like
this:-
Select POSTAL_ADDRESS as "Postal Address" from Emp where ....
Now the column name in Dataview is "Postal Address" which is having a
space, with this column name when I am filtering the Dataview like:-
DataViewAddress.RowFilter = "Postal Address LIKE '*Bel1*'"
which throws following exception:-
System.Data.SyntaxErrorException: Syntax error: Missing operand after
'Address' operator.
I tried
DataViewAddress.RowFilter = "\"Postal Address\" LIKE '*Bel1*'"
I also tried the EncodedColumnName which replaces spaces with _x0020_
like:
DataViewAddress.RowFilter = "Postal_x0020_ Address LIKE '*Bel1*'" but
nothing worked and got the same exception every time..

I searched the net but I didnt get anything on it...
Any help will be Very-Much Helpful..
Thanks and Regards,
Anup Daware

Aug 8 '06 #1
2 1859
Haven't tried it, but give [Postal Address] a whirl; if it works, it would
be ironic given the post subject ;-p

Marc
Aug 8 '06 #2
Yes its working :)
May be I should not have used used such a Subject Line..

Thanx,
Anup Daware

Marc Gravell wrote:
Haven't tried it, but give [Postal Address] a whirl; if it works, it would
be ironic given the post subject ;-p

Marc
Aug 8 '06 #3

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

Similar topics

3
by: Alex Ayzin | last post by:
Hi, I have a problem that might be easy to solve(possibly, I've just overlooked an easy solution). Here we go: I have a dataset with 2 datatables in it. Now, I need to do the following: if...
0
by: Patrick | last post by:
I'm working on a contact management application, and need a hand with one aspect... Here's what I want to create: ------------------------------------ A form split into two parts. There is a...
1
by: Webgour | last post by:
I'm tring to filter a dataview with multiple rowfilters. The problem is that each time I use RowFilter on the DataView i'm quering the full dataview as it was loaded, not the filtered version. Is...
6
by: Ubi | last post by:
hi i have a problem with System.Data.DataViewRowState. i have a ReadOnly datagrid, a dataView and a dataTable. i'm using the dataView's filter property to filter the data (firstName =...
1
by: Jason | last post by:
I've gathered a bunch of data from Active Directory and placed it into a datatable ("ADTable"). I now need to sort and filter this table based on the selection of a drop down list("ddlCategory"). ...
3
by: Shahriar | last post by:
I am using the following statement to filter a dataset. ds.Tables(0).DefaultView.RowFilter = "ID='" & currentpos & " ' It seems to run fine. My question is since I have a filter set, why is the...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
5
by: LDD | last post by:
Hi Folks I'm trying to determine a way to handle paging, filtering and sorting in a datagrid. If I choose to filter and sort, I'd like to return a subset. If that resultset has more records...
3
by: Anup Daware | last post by:
Abstract: I want to filter a dataview with a value where column name have a SPACE. Description:- I bind a dataview to a datagrid, The query which is fetching the results in Dataset is something...
3
by: Harry Haller | last post by:
Hello, I want to implement a generic list which will be used to display 7 columns in a GridView. One should be able to sort, filter and page each of the 7 columns. Ideally the filter should be...
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
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.