Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7393 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hey there FM gurus, I've come to you guys for help.

I currently have built a filemaker db that talks to asp. The only problem is that it seems like my searches are case sensitive. If I do a search for "Smith", it won't show "smith". Please help! I've copied my code below:

<%

Dim registration, oConn, sqlString, lname, lastName, firstName

'lname = request("strSearch")

lastName = request("lastName")

firstName = request("firstName")

'lname = Lcase(lname)

'sqlString = "SELECT * FROM Registration where NameLast = '" & lname & "'"

sqlString = "SELECT * FROM Registration where nameLast = '" & lastName & "' AND nameFirst = '" & firstName & "'"

'sqlString = Lcase(sqlString)

Set registration = Server.CreateObject("ADODB.Recordset")

Set oConn = Server.CreateObject("ADODB.Connection")

oConn.ConnectionString = "AllAsText=0;ApplicationUsingThreads=1;Driver=FileMaker Pro;FetchChunkSize=100;FileOpenCache=0;IntlSort=0; MaxTextlength=255;ServerAddress=127.0.0.1;TranslationOption=0;UseRemoteConnection=1" & Server.MapPath("registration.fp5")

oConn.Open

registration.Open sqlString, oConn, 2, 3

If registration.EOF then

Response.Write "NameLast=Not+Found&NameFirst=Not+Found&Position=Not+Found"

Else

dim count

count = 0

while not (registration.eof)

Response.Write "&NameFirst" & count & "=" & Server.URLEncode(registration("NameFirst")) & "&NameLast" & count & "=" & Server.URLEncode(registration("NameLast")) & "&companya" & count & "=" & Server.URLEncode(registration("companya")) & "&ID" & count & "=" & Server.URLEncode(registration("id"))

count = count + 1

registration.movenext

wend

Response.write "&numberofItems=" & count

End If

registration.Close

Set registration = Nothing

oConn.Close

Set oConn = Nothing

%>

Posted

It could be in here somewhere:

"&NameLast" & count & "=" & Server.URLEncode(registration("NameLast")) &

If the URL ends up like:

&Lastname==Smith&

You can check this by having a look at the database after the request. Check the "Modify Last Find" in the "Records" menu.

It could also be here:

sqlString = "SELECT * FROM Registration where nameLast = '" & lastName & "' AND nameFirst = '" & firstName & "'"

You may have to use:

qlString = "SELECT * FROM Registration where nameLast LIKE '" & lastName & "' AND nameFirst = '" & firstName & "'"

Good Luck.

Garry

This topic is 7393 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.