473,473 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Rowfilter for Boolean column

Hi,
How do you write a Rowfilter for a boolean column?
col1=true
col1='true'
col1= 1
col1= -1

Will all render an exception:
Column 'col1' does not belong to table Test.
Any thoughts?
TIA
Kejpa
Nov 21 '05 #1
5 8428
It looks like that error has nothing to do with your row filter because what
the error says is I can't find a column named col1 in the table called test.

hth
Peter

"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Hi,
How do you write a Rowfilter for a boolean column?
col1=true
col1='true'
col1= 1
col1= -1

Will all render an exception:
Column 'col1' does not belong to table Test.
Any thoughts?
TIA
Kejpa

Nov 21 '05 #2
Yeah, I know.
But the field is there.
In my catch clause I set the datagrid to the datatable instead of to the
filtered dataview

-snip
Try

rsDW.RowFilter = sFilter

grdTableData.DataSource = rsDW

Catch err As Exception

Console.WriteLine(err.Message)

grdTableData.DataSource = dtTable

End Try

-snip
Regards
Kejpa

"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:ue**************@TK2MSFTNGP11.phx.gbl...
It looks like that error has nothing to do with your row filter because what the error says is I can't find a column named col1 in the table called test.
hth
Peter

"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Hi,
How do you write a Rowfilter for a boolean column?
col1=true
col1='true'
col1= 1
col1= -1

Will all render an exception:
Column 'col1' does not belong to table Test.
Any thoughts?
TIA
Kejpa


Nov 21 '05 #3
Sorry....
You have to reset the DataGrid's DataSource property
DataGrid.DataSource = Nothing
DataGrid.DataSource = dwFilter

Solved it all

Anyway, thanks for your effort.
/Kejpa

"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Hi,
How do you write a Rowfilter for a boolean column?
col1=true
col1='true'
col1= 1
col1= -1

Will all render an exception:
Column 'col1' does not belong to table Test.
Any thoughts?
TIA
Kejpa

Nov 21 '05 #4
Hi this works for me

<<<<<<code>>>>>>>>>

Dim cnLogin As New SqlConnection(connectionstring)
Dim ds As New DataSet()
Dim dv As DataView
cnLogin.Open()
Dim da As New SqlDataAdapter("Select * from tr042", cnLogin)
da.Fill(ds)
dv = New DataView(ds.Tables(0))
dv.RowFilter = " col1 = true"
DataGrid1.DataSource = dv
cnLogin.Close()
cnLogin.Dispose()

<<<<<<<code>>>>>>>>

hth Peter

"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Yeah, I know.
But the field is there.
In my catch clause I set the datagrid to the datatable instead of to the
filtered dataview

-snip
Try

rsDW.RowFilter = sFilter

grdTableData.DataSource = rsDW

Catch err As Exception

Console.WriteLine(err.Message)

grdTableData.DataSource = dtTable

End Try

-snip
Regards
Kejpa

"Peter Proost" <pp*****@nospam.hotmail.com> wrote in message
news:ue**************@TK2MSFTNGP11.phx.gbl...
It looks like that error has nothing to do with your row filter because

what
the error says is I can't find a column named col1 in the table called

test.

hth
Peter

"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Hi,
How do you write a Rowfilter for a boolean column?
col1=true
col1='true'
col1= 1
col1= -1

Will all render an exception:
Column 'col1' does not belong to table Test.
Any thoughts?
TIA
Kejpa



Nov 21 '05 #5
Glad you found the answer greetz Peter
"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Sorry....
You have to reset the DataGrid's DataSource property
DataGrid.DataSource = Nothing
DataGrid.DataSource = dwFilter

Solved it all

Anyway, thanks for your effort.
/Kejpa

"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Hi,
How do you write a Rowfilter for a boolean column?
col1=true
col1='true'
col1= 1
col1= -1

Will all render an exception:
Column 'col1' does not belong to table Test.
Any thoughts?
TIA
Kejpa


Nov 21 '05 #6

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

Similar topics

2
by: rawCoder | last post by:
Hi All, I have a column in my datatable that is named like a number i.e. 45 I know its not good to have a column named as number, but... Anyways, so when i set the DataView's RowFilter to...
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 =...
1
by: WStoreyII | last post by:
i have a column that is transaction date the datatype is set to date for the column my question is i need to set a row filter that will show all the dates that contain a certain year and month ...
7
by: Richard Bond | last post by:
Hi, It appears that the rowfilter is not working correctly in the following situation: This is from my immediate window: ?ChkandBaseMeasView(6)("LowSampleCheck") True {Boolean} : True...
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...
2
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...
6
by: =?iso-8859-2?Q?Marcin_Dzi=F3bek?= | last post by:
Hi All: I need to get (filter in) some dataview's rows with DBNULLs in column of boolean type: Actually to get the only rows with DBNULL, I use code like this: DV.RowFilter =...
0
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
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
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
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...
0
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,...
1
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.