Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: VS: Re: Searching for specific records using wildcards.


Message #1 by "Teemu Keiski" <joteke@k...> on Fri, 15 Dec 2000 11:21:12 +0200
Well,  if using Access databases through Jet OLEDB, only these ANSI

"systems" work.



Teemu



-----Alkuperäinen viesti-----

Lähettäjä: Dallas Martin [mailto:dmartin@z...]

Lähetetty: 15. joulukuuta 2000 3:52

Vastaanottaja: ASP Databases

Aihe: [asp_databases] Re: Searching for specific records using

wildcards.





With Access databases, use zipcode LIKE "234*"



With SQL or SQL92 Compliant, use zipcode LIKE "234%"



Let your code supply the wildcard, not the users.





----- Original Message -----

From: "DrClean" <Wayne@d...>

To: "ASP Databases" <asp_databases@p...>

Sent: Friday, December 15, 2000 1:46 AM

Subject: [asp_databases] Searching for specific records using wildcards.





> This is a multi-part message in MIME format.

>

> ------=_NextPart_000_0000_01C06608.F54846A0

> Content-Type: text/plain;

> charset="iso-8859-1"

> Content-Transfer-Encoding: 7bit

>

> Hi  All,

>

> I have a specific problem that i can't seem to solve.

>

> In a web page I have a text field that represents Post Codes filled in

with

> at least 2 characters by the client. When submitted I want to search using

> the string they supply plus a wildcard and return all the relevant records

> in the recordset with postcodes starting with what was supplied.

>

> I've tried querying stored procedures and tables but whatever i do to the

> SQL WHERE statement it doesn't recognise the wildcard element. All I get

> returned is "NO Records Found for HA*" or whatever wildcard I try to use.

>

> I've attempted WHERE  Postcode  LIKE,  WHERE Postcode  MATCHES and WHERE

> Postcode CONTAINS

> and the Request object is passed to a variable strPCode and appended with

a

> *, or a .* or a % (yes I've tried them all), None work.

>

> Can someone please tell me what I'm doing wrong - I don't seem to populate

> the recordset when using wildcards. Out of interest the recordset is

> populated when I don't use wildcards.

>

> Thanks in advance

>

> Wayne

>

> www.DrClean.co.uk

>

>

> ------=_NextPart_000_0000_01C06608.F54846A0

> Content-Type: application/ms-tnef;

> name="winmail.dat"

> Content-Transfer-Encoding: base64

> Content-Disposition: attachment;

> filename="winmail.dat"

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wAAAAAAAAEYA

>

AAAAOIUAAAEAAAABAAAAAAAAAAsADYAIIAYAAAAAAMAAAAAAAABGAAAAAIKFAAABAAAACwA6gAgg

>

BgAAAAAAwAAAAAAAAEYAAAAADoUAAAAAAAADADyACCAGAAAAAADAAAAAAAAARgAAAAARhQAAAAAA

>

AAMAPYAIIAYAAAAAAMAAAAAAAABGAAAAABiFAAAAAAAACwBdgAggBgAAAAAAwAAAAAAAAEYAAAAA

>

BoUAAAAAAAADAF6ACCAGAAAAAADAAAAAAAAARgAAAAABhQAAAAAAAAIB+A8BAAAAEAAAAExdh7g5

>

qr8Rmx02vuTg51sCAfoPAQAAABAAAABMXYe4Oaq/EZsdNr7k4OdbAgH7DwEAAACCAAAAAAAAADih

>

uxAF5RAaobsIACsqVsIAAFBTVFBSWC5ETEwAAAAAAAAAAE5JVEH5v7gBAKoAN9luAAAAQzpcV0lO

>

RE9XU1xMb2NhbCBTZXR0aW5nc1xBcHBsaWNhdGlvbiBEYXRhXE1pY3Jvc29mdFxPdXRsb29rXG91

>

dGxvb2sucHN0AAAAAwD+DwUAAAADAA00/TcAAAIBfwABAAAAMwAAADxMUEJCSkxCTkhLT0RHREZJ

>

Tk9QQkFFSERDQkFBLldheW5lQGRyY2xlYW4uY28udWs+AAADAAYQz79T1AMABxAvAwAAAwAQEAAA

>

AAADABEQAAAAAB4ACBABAAAAZQAAAEhJQUxMLElIQVZFQVNQRUNJRklDUFJPQkxFTVRIQVRJQ0FO

>

VFNFRU1UT1NPTFZFSU5BV0VCUEFHRUlIQVZFQVRFWFRGSUVMRFRIQVRSRVBSRVNFTlRTUE9TVENP

> REVTRklMTEUAAAAAd/A

>

> ------=_NextPart_000_0000_01C06608.F54846A0--

>





--- 

NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?

Visit EarthWeb for the latest in IT Management, Software Development, 

Web Development, Networking & Communications, and Hardware & Systems.  

Click on http://www.earthweb.com for FREE articles, tutorials,

and discussions from the experts.

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #2 by "Teemu Keiski" <joteke@k...> on Fri, 15 Dec 2000 13:56:36 +0200
 I have a little story concerning these wildcards and Access databases used

through Jet Engine. =)

In this case I think you already knew this, but this might still help

someone.



My task was to create search engine for member register that was in Access

database. In procedures I used these * wildcards because I thought they'd

work equally through Jet Engine. The idea was just to do a search with

string given by user(I was adding with string manipulation these * wildcards

and "giving" the searched string to procedure as a parameter). I began to

wonder what was wrong because I didn't get any records "out" (not even error

messages!!!). It was very frustrating because there was over 100 records

that should match this condition I was trying.



In Access help(Jet Reference) I found that if using Jet OLEDB(4+) only these

ANSI's wildcards would work. And when I removed *:s and replaced them with

%:s, everything began to work as I planned.



Teemu





-----Alkuperainen viesti-----

Lahettaja: Imar Spaanjaars [mailto:Imar@S...]

Lahetetty: 15. joulukuuta 2000 12:47

Vastaanottaja: ASP Databases

Aihe: [asp_databases] Re: Searching for specific records using

wildcards.





How about the following pseudo code?





Open connection

sSQL = "SELECT COUNT(ID) FROM myTable WHERE something is something

Recordset.Open sSQL, MyConnection

iCount = Recordset(0)

sSQL = "SELECT only, the, fields, you, need FROM myTable WHERE something is

something

Recordset.Open sSQL, MyConnection

Do something with the recordset

Close Recordset

Close Connection



Bit strange code, but it should give you an idea on how to do it.

Looping through a recordset just to count is an awful waste of resources.

The COUNT(ColumnName) function will give you the answer way faster.

Check out Ken's site to read on about ways to retrieve the number of

records.

http://www.adopenstatic.com/faq/recordcountalternatives.asp



BTW, I am surprised that like '%' works on an Access database. I thought it

was a *



Imar





At 09:32 AM 12/15/2000 +0000, you wrote:

>Thanks Imar & Dallas,

>

>It is an access database that I'm thinking of upsizing because it's rather

>large. But- Yes I have got it working - by using the % and changing the

LIKE

>to = on the second condition (number field).

>

>I've included to check that it's right as I am not totally sure that I'll

>have no problems with the = sign on different browsers? I've also got two

>recordset variables which I feel is wasting resources but I know of no

other

>way to count the results before printing them. I tried using the same

>variable for both but it wouldn't perform 2 while opperations.

>

>Your advice is much appreciated.

>

>Wayne

>

>www.DrClean.co.uk

>

><%

>         Dim strPCode, rsRepList, rsRecCount, strSQL, intRecsFound,

objCommand

>

>         strPCode = Request.Form("Postcode")                     'variable

> gets the postcode

>         strPCode = UCase(strPCode)                              'make

> sure it's upper case

>         strPCode = strPCode & "%"                               'append

> the wildcard

>

>                         'set the SQL statement  on the access database

>         strSQL =        "SELECT * FROM tblBusinesses " &_

>                                 "WHERE Postcode LIKE '" & strPCode & "' "

&_

>                                 "AND SIC_Number = '52720';"

>

>                         'get a command object up and running

>         Set objCommand = Server.CreateObject("ADODB.Command")

>         objCommand.ActiveConnection = objConn

>         objCommand.CommandText = strSQL

>         objCommand.CommandType = adCmdText

>

>                         'open a recordset

>         Set rsRepList = objCommand.Execute

>         Set rsRecCount = objCommand.Execute

>

>                         'Count the records

>         intRecsFound = 0

>         While not rsRecCount.EOF

>                 intRecsFound = intRecsFound+1

>                 rsRecCount.MoveNext

>         Wend

>

>         Response.Write "<P align='Center'><Font face='Comic MS Sans'

size='3'

>color='#0000FF'>The search found " & intRecsFound & " Records.<Br> To

narrow

>the search be more" &_

>                                      " specific with the Post Code and if

> too few records have been

>found extend the search by " &_

>                                      "looking at a different Post Code or

> being less

>specific.<Br><Br></P></Font>"

>

>         Set objCommand = Nothing

>

>                                 'Display the records

>         While Not rsRepList.EOF

>                 Response.Write _

>                 "<Table border=0 width='80%' CellSpacing='2'

CellPadding='2'

>bgcolor='#3399FF' align='center'>" &_

>                         "<Tr>" &_

>                           "<Td align='Center' colspan=2> " &

> rsRepList("BusName") &_

>                           "</TD>" &_

>                         "</Tr>" &_

>                         "<Tr>" &_

>                           "<Td colspan=2>  Contact; " &

> rsRepList("Contact") &_

>                           "</TD>" &_

>                         "</Tr>" &_

>                         "<Tr>" &_

>                           "<Td> Tel: " & rsRepList("Telephone") & "<Br>

> Fax; " & rsRepList("Fax")

>&_

>                           "</Td>" &_

>                           "<Td>" & rsRepList("Number") & "<Br>" &

> rsRepList("Building") & "<Br>"

>&_

>                                         rsRepList("Street") & "<BR>" &

> rsRepList("Town") & " " &

>rsRepList("Postcode") &_

>                                 "</TD>" &_

>                         "</Tr>" &_

>                         "<Tr>" &_

>                           "<Td> Classification; <Br> " &

> rsRepList("SIC_Description") &_

>                           "</Td>" &_

>                           "<Td> Email; <Br>" & rsRepList("Email") &_

>                           "</Td>" &_

>                         "</Tr>" &_

>                         "<tr>" &_

>                            "<td colspan=2><hr>" &_

>                            "</Td>" &_

>                           "</Tr>"

>                 rsReplist.MoveNext

>                 Response.Write "</Table>"

>

>         wend

>                                 'clean up

>         rsRepList.close

>         set rsRepList = nothing

>         rsRecCount.close

>         set rsRecCount = nothing

>%>

>

>

>

>

>

>

>

>

>

>

>

>

>

>

>-----Original Message-----

>From: Imar Spaanjaars [mailto:Imar@S...]

>Sent: 14 December 2000 22:51

>To: ASP Databases

>Subject: [asp_databases] Re: Searching for specific records using

>wildcards.

>

>

>For SQL server, the % sign should do the trick.

>

>SELECT clmSomething FROM tblSomeTable WHERE anOtherCOLUMN LIKE 'AB%'

>

>will return all records where anOtherCOLUMN starts with AB.

>

>But since you mentioned you already tried the % sign, something else is

>probably going wrong, so maybe you could post some of your code.

>

>HtH

>

>Imar

>

>

>At 10:46 PM 12/14/2000 -0800, you wrote:

> >This is a multi-part message in MIME format.

> >

> >------=_NextPart_000_0000_01C06608.F54846A0

> >Content-Type: text/plain;

> >         charset="iso-8859-1"

> >Content-Transfer-Encoding: 7bit

> >

> >Hi  All,

> >

> >I have a specific problem that i can't seem to solve.

> >

> >In a web page I have a text field that represents Post Codes filled in

with

> >at least 2 characters by the client. When submitted I want to search

using

> >the string they supply plus a wildcard and return all the relevant

records

> >in the recordset with postcodes starting with what was supplied.

> >

> >I've tried querying stored procedures and tables but whatever i do to the

> >SQL WHERE statement it doesn't recognise the wildcard element. All I get

> >returned is "NO Records Found for HA*" or whatever wildcard I try to use.

> >

> >I've attempted WHERE  Postcode  LIKE,  WHERE Postcode  MATCHES and WHERE

> >Postcode CONTAINS

> >and the Request object is passed to a variable strPCode and appended with

a

> >*, or a .* or a % (yes I've tried them all), None work.

> >

> >Can someone please tell me what I'm doing wrong - I don't seem to

populate

> >the recordset when using wildcards. Out of interest the recordset is

> >populated when I don't use wildcards.

> >

> >Thanks in advance

> >

> >Wayne

> >

> >www.DrClean.co.uk

> >

> >

> >------=_NextPart_000_0000_01C06608.F54846A0

> >Content-Type: application/ms-tnef;

> >         name="winmail.dat"

> >Content-Transfer-Encoding: base64

> >Content-Disposition: attachment;

> >         filename="winmail.dat"

> >

>

>eJ8+IioUAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWN

>y

>

>b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEGgAMADgAAANAHDAAOABMANwAAAAQAPwE

>B

>

>A5AGAAgIAAAlAAAACwACAAEAAAALACMAAAAAAAMAJgAAAAAACwApAAAAAAADADYAAAAAAB4AcAA

>B

>

>AAAAMAAAAFNlYXJjaGluZyBmb3Igc3BlY2lmaWMgcmVjb3JkcyB1c2luZyB3aWxkY2FyZHMuAAI

>B

>

>cQABAAAAFgAAAAHAZgfXBmCM92LR+RHUo5i3bqNWVz8AAAIBHQwBAAAAGQAAAFNNVFA6V0FZTkV

>A

>

>RFJDTEVBTi5DTy5VSwAAAAALAAEOAAAAAEAABg4AAra9B2bAAQIBCg4BAAAAGAAAAAAAAABMXYe

>4

>

>Oaq/EZsdNr7k4OdbwoAAAAsAHw4BAAAAAgEJEAEAAACaAwAAlgMAAEQFAABMWkZ15FIF2AMACgB

>y

>

>Y3BnMTI1JjIA+AtgbmcB0DU3TwH3AqQD4wIAY2gKwHPwZXQwIAcTAoMAUALySRDJU2gJESBIAHB

>k

>

>zQKAfQqACMggOwlvDjCWNQKACoF2CJB3awuA9GQ0DGBjAFALAwu1E3DEaSARYGxsLAq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CSkxCTkhLT0RHREZ

>J

>

>Tk9QQkFFSERDQkFBLldheW5lQGRyY2xlYW4uY28udWs+AAADAAYQz79T1AMABxAvAwAAAwAQEAA

>A

>

>AAADABEQAAAAAB4ACBABAAAAZQAAAEhJQUxMLElIQVZFQVNQRUNJRklDUFJPQkxFTVRIQVRJQ0F

>O

>

>VFNFRU1UT1NPTFZFSU5BV0VCUEFHRUlIQVZFQVRFWFRGSUVMRFRIQVRSRVBSRVNFTlRTUE9TVEN

>P

> >REVTRklMTEUAAAAAd/A

> >

> >------=_NextPart_000_0000_01C06608.F54846A0--

> >







--- 

FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND

INSIGHTS IN YOUR INBOX!

Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb?s

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com

Message #3 by Imar Spaanjaars <Imar@S...> on Fri, 15 Dec 2000 13:12:42 +0100
Aha, so they are finally going to adopt some ANSI standards...... Thanks 

for the tip.

I usually work with SQL server so I wasn't aware of any problems with Access.



Imar



(Also amended the ASP FAQ at http://p2p.wrox.com - thanks - moderator)



At 01:56 PM 12/15/2000 +0200, you wrote:

>  I have a little story concerning these wildcards and Access databases used

>through Jet Engine. =)

>In this case I think you already knew this, but this might still help

>someone.

>

>My task was to create search engine for member register that was in Access

>database. In procedures I used these * wildcards because I thought they'd

>work equally through Jet Engine. The idea was just to do a search with

>string given by user(I was adding with string manipulation these * wildcards

>and "giving" the searched string to procedure as a parameter). I began to

>wonder what was wrong because I didn't get any records "out" (not even error

>messages!!!). It was very frustrating because there was over 100 records

>that should match this condition I was trying.

>

>In Access help(Jet Reference) I found that if using Jet OLEDB(4+) only these

>ANSI's wildcards would work. And when I removed *:s and replaced them with

>%:s, everything began to work as I planned.

>

>Teemu

>







---

FREE WEB DEVELOPMENT CODE, CONTENT, AND INSIGHTS

IN YOUR INBOX!

Get the latest and best HTML, XML, and JavaScript tips, tools, and 

developments from the experts.  Sign up for one or more of EarthWeb's

FREE IT newsletters at http://www.earthweb.com today!  

---

You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')

To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com


  Return to Index