473,698 Members | 2,942 Online
Bytes | Software Development & Data Engineering Community
+ 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 8485
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.alco m.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.Da taSource = rsDW

Catch err As Exception

Console.WriteLi ne(err.Message)

grdTableData.Da taSource = dtTable

End Try

-snip
Regards
Kejpa

"Peter Proost" <pp*****@nospam .hotmail.com> wrote in message
news:ue******** ******@TK2MSFTN GP11.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.alco m.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.DataSo urce = Nothing
DataGrid.DataSo urce = dwFilter

Solved it all

Anyway, thanks for your effort.
/Kejpa

"Kejpa" <kS*******@saj. fi> wrote in message
news:cl******** **@gandalf.alco m.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(c onnectionstring )
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.Tab les(0))
dv.RowFilter = " col1 = true"
DataGrid1.DataS ource = dv
cnLogin.Close()
cnLogin.Dispose ()

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

hth Peter

"Kejpa" <kS*******@saj. fi> wrote in message
news:cl******** **@gandalf.alco m.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.Da taSource = rsDW

Catch err As Exception

Console.WriteLi ne(err.Message)

grdTableData.Da taSource = dtTable

End Try

-snip
Regards
Kejpa

"Peter Proost" <pp*****@nospam .hotmail.com> wrote in message
news:ue******** ******@TK2MSFTN GP11.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.alco m.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.alco m.aland.fi...
Sorry....
You have to reset the DataGrid's DataSource property
DataGrid.DataSo urce = Nothing
DataGrid.DataSo urce = dwFilter

Solved it all

Anyway, thanks for your effort.
/Kejpa

"Kejpa" <kS*******@saj. fi> wrote in message
news:cl******** **@gandalf.alco m.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
304
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 some thing like "45='blah'" System.Data.EvaluateException is raised with message "Cannot perform '='
8
3892
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
1104
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 i know that this would work to show just the certain date like rowfilter = "tdate = '4/5/2006'" but how do i do so that only
7
1461
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 {Boolean} ChkandBaseMeasView.RowFilter = "LowSampleCheck = True"
0
1518
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 using rowfilter with like operator Its working fine when data type of searching column is "string" . But if data type is "integer , datetime or boolean" its throws
2
18929
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 using rowfilter with like operator Its working fine when data type of searching column is "string" . But if data type is "integer , datetime or boolean" its throws
1
2710
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 global dataview is created -The user enters new part information into a form. -A function is called to check to see if the part is a new part (so that two identical part numbers are not added to the database. -The check is done by setting the...
5
11837
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 global dataview is created -The user enters new part information into a form. -A function is called to check to see if the part is a new part (so that two identical part numbers are not added to the database. -The check is done by setting the...
6
17502
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 = "(IsNull(MyBooleanColumnName, True) = True) AND (IsNull(MyBooleanColumnName, False) = False)" or ex. DV.RowFilter = "(IsNull(MyIntegerColumnName, 1) = 1) AND (IsNull(MyIntegerColumnName, 0) = 0)" for columns of Integer...
0
8683
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
8610
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
9170
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
8873
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
7740
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...
1
6528
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
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.