473,387 Members | 1,899 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,387 software developers and data experts.

Filter Names With an Asterix

I have an account list. There's an asterix in the account name if it has
closed. For example, Acm* Corp. I don't agree with this design but that's
what our company came up with. Anyway, I'm trying to filter out these closed
accounts from my datagrids. In Access, I used to write WHERE ACCDESC NOT
"*[*]*" and that would filter them out. Not so in vb.NET. Anyone know how to
accomplish this? Thanks!
Dec 9 '05 #1
2 1463
What do you mean by "VB.NET"? You must be using a specific .NET
Framework class to hold your data, which you are trying to filter.

I'll assume you are using the RowFilter property on a DataView. If not,
this answer may not apply.

With a DataView named dv, this should work:

dv.RowFilter = "accdesc not like '%[*]%'";
Joshua Flanagan
http://flimflan.com/blog
Mike C wrote:
I have an account list. There's an asterix in the account name if it has
closed. For example, Acm* Corp. I don't agree with this design but that's
what our company came up with. Anyway, I'm trying to filter out these closed
accounts from my datagrids. In Access, I used to write WHERE ACCDESC NOT
"*[*]*" and that would filter them out. Not so in vb.NET. Anyone know how to
accomplish this? Thanks!

Dec 9 '05 #2
That worked perfectly. THANKS!

"Joshua Flanagan" wrote:
What do you mean by "VB.NET"? You must be using a specific .NET
Framework class to hold your data, which you are trying to filter.

I'll assume you are using the RowFilter property on a DataView. If not,
this answer may not apply.

With a DataView named dv, this should work:

dv.RowFilter = "accdesc not like '%[*]%'";
Joshua Flanagan
http://flimflan.com/blog
Mike C wrote:
I have an account list. There's an asterix in the account name if it has
closed. For example, Acm* Corp. I don't agree with this design but that's
what our company came up with. Anyway, I'm trying to filter out these closed
accounts from my datagrids. In Access, I used to write WHERE ACCDESC NOT
"*[*]*" and that would filter them out. Not so in vb.NET. Anyone know how to
accomplish this? Thanks!

Dec 10 '05 #3

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

Similar topics

11
by: Matt | last post by:
Hi everyone, still pretty new to MySQL. I was wondering if there is a way to automatically filter records based on a mysql userlogin name?? I have serveral databases that I want to combine in...
1
by: thijs.kupers | last post by:
Hello, I want to list all the user-tables of a DB2 database. I use the ADO-openSchema method (adSchemaTables), but I can't filter the systables out. Has someone any idea how to select...
3
by: Dan V. | last post by:
How can I use real SQL on a DataTable? i.e. not array of rows using a filter... as in DataTable.Select. I read at : microsoft.public.dotnet.framework.adonet "As others have posted: There is no...
6
by: phonl | last post by:
VB.Net 2005 I have a bound datagrid with a list of names. I want to add a button that will filter the names so that only the names that start with "H" will display. How would I do that? ...
0
bartonc
by: bartonc | last post by:
By encapsulating just a few fuctions from two library modules, we get a clear picture of what a digital filter looks like. Also, by splitting __init__ into two section, the filter's creation...
9
by: dee | last post by:
I'd like to filter by the following criteria: left(LeadDisposition,3) = "Sit" AND Appt_Date = Text767 I have no idea how to do this. Appreciate help.
8
by: Abedin | last post by:
I have 9 digits in form of "111020402". Then I have another 9 digits in form of "111020403". I have 100,000 records of these two 9-digit numbers. I want to filter this as follows: District:...
2
by: dale5804 | last post by:
hi im using the code below to password protect a button on a form.... is there any code i can use within the below to *asterix* out the password when typed in cheers. Private Sub...
3
by: franc sutherland | last post by:
Hello, I have a report which I filter using the me.filter command in the OnOpen event. Me.Filter = "OrderID=" & Forms!variable_form_name! Me.FilterOn = True I want to be able to open that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.