473,513 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find row using * wildcard or similar (Like) with dataview/dataTabl

Is it possible to use a wildcard like feature with Dataview.Find? Actually,
I tried that but did not get any rows. Is there some wildcard like feature
of the dataview or some other object that I could search/find rows in an
ADO.Net dataTable?

Or, am I stuck having to write a loop and search the loop for a substring of
an expression?
Mar 8 '07 #1
4 14611
Rich,

I think that Dataview.Find expects a key and looks for an exact match.

On the other hand, Datatable.Select will let you use the Like operator and
wildcards.

Kerry Moorman
"Rich" wrote:
Is it possible to use a wildcard like feature with Dataview.Find? Actually,
I tried that but did not get any rows. Is there some wildcard like feature
of the dataview or some other object that I could search/find rows in an
ADO.Net dataTable?

Or, am I stuck having to write a loop and search the loop for a substring of
an expression?

Mar 8 '07 #2
On Mar 8, 4:37 pm, Rich <R...@discussions.microsoft.comwrote:
Is it possible to use a wildcard like feature with Dataview.Find? Actually,
I tried that but did not get any rows. Is there some wildcard like feature
of the dataview or some other object that I could search/find rows in an
ADO.Net dataTable?

Or, am I stuck having to write a loop and search the loop for a substring of
an expression?
If you're searching text fields I know you can use
Table.Rows.Select("FieldName Like '%whatever%'") to return all the
rows that have the FieldName column matching 'whatever' in any part of
it. It returns them into an array of DataRow objects you can iterate
through.

Mar 8 '07 #3
Thanks all for your replies. That was what I needed. Table.Rows.Select.

"Rich" wrote:
Is it possible to use a wildcard like feature with Dataview.Find? Actually,
I tried that but did not get any rows. Is there some wildcard like feature
of the dataview or some other object that I could search/find rows in an
ADO.Net dataTable?

Or, am I stuck having to write a loop and search the loop for a substring of
an expression?

Mar 9 '07 #4
Kerry,

I always have that same idea like you, however the Select Expression is
AFAIK the same as the rowfilter Expression, therefore I would not know why
it would not work.

Cor

"Kerry Moorman" <Ke**********@discussions.microsoft.comschreef in bericht
news:47**********************************@microsof t.com...
Rich,

I think that Dataview.Find expects a key and looks for an exact match.

On the other hand, Datatable.Select will let you use the Like operator and
wildcards.

Kerry Moorman
"Rich" wrote:
>Is it possible to use a wildcard like feature with Dataview.Find?
Actually,
I tried that but did not get any rows. Is there some wildcard like
feature
of the dataview or some other object that I could search/find rows in an
ADO.Net dataTable?

Or, am I stuck having to write a loop and search the loop for a substring
of
an expression?


Mar 9 '07 #5

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

Similar topics

7
3841
by: junk1 | last post by:
I am running a query from a Java app via the IBM type 4 driver back to MF DB2 and am getting a strange result. Basically my statement is SELECT BLAH WHERE NAME LIKE ? ....and I pass in "Fr%" expecting it to match with "Fred" but it doesnt. ....but if I pass in "Fr%%" then it does match "Fred".
2
4165
by: deko | last post by:
I'm trying to use a textbox to search and display records as each letter is typed in - similar to the behavior of a combo box. But for some reason I can't seem to get the wildcard search character to work in my query. In the example below, I have several records in tblEntity that begin with "m" and "mi" and one record with the company name...
8
8502
by: newbie_csharp | last post by:
Hi, I need to use single qoutation ( ' ) in my filter string but I get error message. how can I do something like this: mysearch = "Bob's book"; dataView.RowFilter = "myfield LIKE '" + mysearch + "%'"; even I changed "mysearch to this but still it's not working: mysearch = "Bob\'s book";
1
3476
by: JemPower | last post by:
Hi all, Can someone tell me if it's possible to search through a dataview based on a part-filter. For example, if I use... Dim dvAvailable = New DataView(dsRecipients.Tables("Available"), "name='%jo&'","", DataViewRowState.CurrentRows)
3
2146
by: oscar | last post by:
i've created a search function, using vc#, and i'm using the dataview.find() method to get the index of the found record. the problem is that there are many similar names. it always returns the same index, but it can be any one of the items. as an example, if i type in the work "bolt" it will return the index 1201, the first "bolt" is at...
2
8808
by: Anandan | last post by:
Hi, In our Project we use Dataset to load the Grid with Values. We have some criteria to filter the values to be shown in the Grid. For that we used the SELECT command to filter the Same Dataset. The SELECT Command we are using is as follows DS.Tables(0).Select("FieldName = '" & input value & "')
10
6707
by: Robert | last post by:
How do you get an accurate count of the number of records returned from a query when using linked tables. I have an access 2003 database as a front end to another access 2003 database that contains only tables. I have linked the tables for the front end to the back end database. I am trying to set the recordsource of a form to a query...
2
2444
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I need to locate a row (or see if it exists) in a table contained in a dataset. The DataView.Find method seems to work OK for one criteria but I need to use 2 criterias. Is there anything in VB2005 that does was DLookUpd does in Access - but for a table contained in a Dataset? I realize that DLookUp works on Physical tables...
7
1730
by: BlackJack17 | last post by:
I have another newbie question for you guys... I apologize in advance for how simple it is... I've got a string of data, included in that string is 11* as it appears, the * is not a wildcard. I'm using the function Like "*" & "11*" & "*" to find any records that have "11*", again, the * is not a wildcard. But it's interpreting it as a...
0
7270
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...
0
7178
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...
1
7128
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5704
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...
0
4759
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...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
1612
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
1
817
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
473
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...

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.