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

Wildcards are not allowed in the middle of the String (Dataset Fil

Hi,

This is regarding Dataset Filter:

WILDCARD CHARACTERS

Both the * and % can be used interchangeably for wildcards in a LIKE
comparison. If the string in a LIKE clause contains a * or %, those
characters should be escaped in brackets ([]). If a bracket is in the clause,
the bracket characters should be escaped in brackets (for example [[] or
[]]). A wildcard is allowed at the beginning and end of a pattern, or at the
end of a pattern, or at the beginning of a pattern. For example:

"ItemName LIKE '*product*'"

"ItemName LIKE '*product'"

"ItemName LIKE 'product*'"

Wildcards are not allowed in the middle of a string. For example, 'te*xt' is
not allowed.

The above given by MSDN notes,

I want to know any resolution on this ,

Wildcards are not allowed in the middle of the String (Dataset Filter) or
remain
same ??.

Thanks
Anandan k
Nov 21 '05 #1
1 6654
Hi,

This will not work.
ds.Tables("Products").DefaultView.RowFilter = "ProductName Like 'C%G'"

This will
ds.Tables("Products").DefaultView.RowFilter = "ProductName Like '%G' and
ProductName Like 'C%'"
Ken
-----------------------------
"Anandan" <An*****@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
Hi,

This is regarding Dataset Filter:

WILDCARD CHARACTERS

Both the * and % can be used interchangeably for wildcards in a LIKE
comparison. If the string in a LIKE clause contains a * or %, those
characters should be escaped in brackets ([]). If a bracket is in the
clause,
the bracket characters should be escaped in brackets (for example [[] or
[]]). A wildcard is allowed at the beginning and end of a pattern, or at the
end of a pattern, or at the beginning of a pattern. For example:

"ItemName LIKE '*product*'"

"ItemName LIKE '*product'"

"ItemName LIKE 'product*'"

Wildcards are not allowed in the middle of a string. For example, 'te*xt' is
not allowed.

The above given by MSDN notes,

I want to know any resolution on this ,

Wildcards are not allowed in the middle of the String (Dataset Filter) or
remain
same ??.

Thanks
Anandan k

Nov 21 '05 #2

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

Similar topics

2
by: Mark | last post by:
I'd like to load xml contents to my dataset from an XML document in memory. The dataset.ReadXML requires a file on drive. Is there a way to do this from xmldoc in memory? Goal is to use data...
9
by: Robert Brown | last post by:
If I use _reverse_ wildcard search will it always result in a table scan? Is it possible to get the DB (Oracle or SQL server) to use indexes when doing reverse wildcard match? let's say I have:...
6
by: Gary Morris | last post by:
Hi all, I tried posting this through a free news server, but it still has not appeared in Google, so if it turns up again I apologize. I hope someone can help me with this, or at least help...
4
by: Joerg M. Colberg | last post by:
Hi all, I have a problem when using a DataSet. I am using it to query a SQLServer database as follows. In my code it looks like SqlDataAdapter eDA = new SqlDataAdapter(sqlcmd); // where...
0
by: DotNetJunkies User | last post by:
I have data in my DataTable that lists multiple values in the Roles column which are space separated like this: " AM AMB MCS DIO CO PM3 CAM " I need to be able to query on this column to get back...
4
by: Cliff | last post by:
Hello I'm trying to search for each instance of a string (using wildcards) in another string. I know there is the Like operator, but it seems to be work with booleans and I want to define a string...
2
by: Lucas Tam | last post by:
I'm not sure if this is a problem with Microsoft's Application Data Blocks, but I am using a query like this: USE DATABASENAME;SELECT * FROM SOMETABLE The tablename property of my datasets are...
25
by: electrixnow | last post by:
in MS VC++ Express I need to know how to get from one comma delimited text string to many strings. from this: main_string = "onE,Two,Three , fouR,five, six " to these: string1 =...
9
by: Abandoned | last post by:
Hi.. I want to delete all now allowed characters in my text. I use this function: def clear(s1=""): if s1: allowed = s1 = "".join(ch for ch in s1 if ch in allowed) return s1
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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,...
0
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,...

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.