Minor problem - need some help 
Author Message
 Minor problem - need some help

Hello

Having a minor problem with a searchpage/resultpage. A listbox combined with
a textfield looking like this:

<select name="Choice1" size="1">
                <option value="&gt;=" selected>Greater than or
equal</option>
                <option value="&lt;=">Less than than or equal</option>
              </select>
              <input type="integer" name="txtPrice" size="10">

Giving the resultpage a string like this:

<%
Dim Recordset1__varPrice
Recordset1__varPrice = "%"
if (Request(txtPrice) <> "") then Recordset1__varPrice = (Request(Choice1) +
Request(txtPrice))
%>
<%
set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_database_STRING
sql = "SELECT ID, Store, Address, Price, bla,bla,bla FROM tblShop "
sql = sql & "WHERE Store LIKE '" & Replace(Recordset1__varStore, "'", "''")
& "' "
sql = sql & "WHERE Address LIKE '" & Replace(Recordset1__varAddress, "'",
"''") & "' "
sql = sql & "AND Price " (Choice1) + Replace(Recordset1__varPrice, "'",
"''") + ""
Recordset1.Source = sql
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 3
Recordset1.Open()
Recordset1_numRows = 0
%>

Any help on this would be very much appreciated.

Thanks



Fri, 17 Sep 2004 17:32:42 GMT  
 Minor problem - need some help
Got it now
Thanks


Quote:
> Hello

> Having a minor problem with a searchpage/resultpage. A listbox combined
with
> a textfield looking like this:

> <select name="Choice1" size="1">
>                 <option value="&gt;=" selected>Greater than or
> equal</option>
>                 <option value="&lt;=">Less than than or equal</option>
>               </select>
>               <input type="integer" name="txtPrice" size="10">

> Giving the resultpage a string like this:

> <%
> Dim Recordset1__varPrice
> Recordset1__varPrice = "%"
> if (Request(txtPrice) <> "") then Recordset1__varPrice = (Request(Choice1)
+
> Request(txtPrice))
> %>
> <%
> set Recordset1 = Server.CreateObject("ADODB.Recordset")
> Recordset1.ActiveConnection = MM_database_STRING
> sql = "SELECT ID, Store, Address, Price, bla,bla,bla FROM tblShop "
> sql = sql & "WHERE Store LIKE '" & Replace(Recordset1__varStore, "'",
"''")
> & "' "
> sql = sql & "WHERE Address LIKE '" & Replace(Recordset1__varAddress, "'",
> "''") & "' "
> sql = sql & "AND Price " (Choice1) + Replace(Recordset1__varPrice, "'",
> "''") + ""
> Recordset1.Source = sql
> Recordset1.CursorType = 0
> Recordset1.CursorLocation = 2
> Recordset1.LockType = 3
> Recordset1.Open()
> Recordset1_numRows = 0
> %>

> Any help on this would be very much appreciated.

> Thanks



Tue, 21 Sep 2004 02:05:41 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Minor problem - need some help, please!

2. Upgrading 3.5 to NT4 client on Oracle? Read!

3. BEGINNER: EDatabaseError...

4. DataCombo minor problem, need help quickly

5. Minor Snafu with VB4 -- Need Help, Please

6. Word 2000 forms minor? problems

7. Word to Excel...further minor problems

8. Minor problem with Template

9. hmm minor problem

10. Using MS-Word Thesaurus - Code Has Minor Problems

11. Weird minor problem

12. Minor Problem with Text Boxes

 

 
Powered by phpBB® Forum Software