Search Parameters
Skip Navigation Links.

Search Parameters

Skip Navigation LinksHome :: ASP.NET :: Parameterized Query Class :: Search parameters

MatchWholeString same as SQL: LIKE '%[search string]%'

match any part of the field with the whole string (like InStr() function) e.g. 'we made a birthday cake today' has matches [birthday cake] and [cake today]

MatchFirstPartOfWord same as SQL: LIKE '% [search string]%'

Search records for words starting with character i.e match any part of the field with the search string PLUS a leading space e.g. ben matches ben bent benefits etc.

MatchWholeWord same as SQL: LIKE '% [search string] %'

search any part of the field for whole words i.e. a string with a leading and trailing space e.g. 'we made a birthday cake today' is matched by we/made/a/birthday/cake/today

MatchWholeStringToWholeField same as SQL: = N'[search string]'

The whole of the search string is the same as the whole of the searched field

IntegerEquals same as SQL: = [an integer]

Find an integer (in an integer field) - usually a single record (from the primary key/identity field)

IntegerMoreThan same as SQL: >=

Return records where the integer field (usually the primary key/identity field) is MORE than

IntegerLessThan same as SQL: less than or = to

Return records where the integer field (usually the identity key field) is LESS than

DateMatch

match a date value (to the same day)

DateFrom same as SQL: date >=

Return records where the date is LESS than the date value searched on

DateTo same as SQL: date less than or = to

Return records where the date is GREATER than the date value searched on

MatchFirstCharacter used by the glossary for an alphabet search

Match the first character in the string - great for words beginning with..

MatchInCommaDelimitedField

Find a value in a field that is comma delimited e.g. 1,7,33,5

DateYearEquals

automatically search for a year i.e. same as SQL (YEAR([fieldname]) = 1999 ) "

IntegerDoesNotEqual

Return records where the integer field (usually the identity key field) DOES NOT equal the value

DateWeekEquals

automatically search for a week in a date field i.e. same as SQL ({ fn WEEK(DateCreated) } = 1 ) "

IsNull

NULL field i.e. same as (Keywords IS NULL)

ZeroLengthString

Zero length field i.e. same as (Keywords = '')

Full Documentation here

You may reuse this code BUT not for sale AND ONLY with credit to www.BennySutton.com

Next >> Fill a Datareader
top of page
all content ©1996/2012 BennySutton.com
all images © their respective owners This site uses Thumbshots previews