|
|
|
|
|
| | |
|
Active Server Pages ASP a directory of ASP tutorials applications scripts components and articles for the novice to professional developer. CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Search Results from database using LIKE |
From: |
Gary jenkinson |
Date: |
9/27/1999 8:46:58 AM |
IP: |
195.166.139.133 |
Hi everybody,
being new to web programming I have come across a question to which I cannot find an answer.
I wish to be able to enter text into a text box on a particular page and show the results on a subsequent page. At the moment I ams using the following SQL string to try and achieve the desired results.
Set rst = Server.CreateObject("ADODB.Recordset")
sqlstring = "SELECT * FROM [Organisations] WHERE [Organisation] LIKE%" & Request.form("Searching")& "%"
The above code is on the results page, but when I run the text box. The reuslts are to say the least wrong.
I sometimes get sertain results which seem to be correct, until I scan the lower records. Other times get all the results, no matter what I enter.
I can only assume the code or the procedure is incorrect. Could anyone please help me.
Gary J
|
|
|
|
|
|
|
|
|
|
|
|
|