Someone help, I've been pulling my hair out over this one. I keep getting an "Invalid procedure call or argument: 'Left'" error whenever I run this piece of code...
strSql="SELECT NAME FROM Places WHERE NAME = '" & Request.Form("StartPlace"
& "'"
Set rs = db.Execute(strSql)
' If there are no entries in the rs then find some
PlaceString = Request.Form("StartPlace"
Do While rs.RecordCount = -1
Length = Len(PlaceString) - 1
PlaceString = Left(PlaceString, Length)
strSql = "SELECT NAME FROM Places WHERE NAME LIKE '" & PlaceString & "%'"
Set rs = db.Execute(strSql)
Loop
This is a simple loop meant to search for a city within the database and if it comes up with more than one match it outputs it for the user to choose which city to use. It's kinda like something you would see on expedia to get an address for a map.
There may be a simpler or better way to handle this search loop. I would appreciate any suggestions on this part as well.
strSql="SELECT NAME FROM Places WHERE NAME = '" & Request.Form("StartPlace"
Set rs = db.Execute(strSql)
' If there are no entries in the rs then find some
PlaceString = Request.Form("StartPlace"
Do While rs.RecordCount = -1
Length = Len(PlaceString) - 1
PlaceString = Left(PlaceString, Length)
strSql = "SELECT NAME FROM Places WHERE NAME LIKE '" & PlaceString & "%'"
Set rs = db.Execute(strSql)
Loop
This is a simple loop meant to search for a city within the database and if it comes up with more than one match it outputs it for the user to choose which city to use. It's kinda like something you would see on expedia to get an address for a map.
There may be a simpler or better way to handle this search loop. I would appreciate any suggestions on this part as well.