Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I don't think testimonials would have enticed me to become a member, or even use the site for that matter. I use the site for a learning experience..."

Geography

Where in the world do Tek-Tips members come from?

Urgent Problem with Input form and sql statement

magsmo (Programmer)
5 Apr 03 18:31
Can anyone help me with this.
The user inputs the value they are looking for.
And should get back a result but i am getting the error http 500.
I think the problem is with the sql statment.
Here is the code:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">;
<wml>
<card id="Search" title="Search">
<%
Response.ContentType = "text/vnd.wap.wml"
%>
<p align="center">
Enter Symbol: <input type="text" name="Symbol" size="15"/><br/>
<do type="accept" label="Search">
            <go href="#Results" method="post">
                <postfield name="Symbol" value="$Symbol"/>
            </go>
        </do>
</p>
</card>

<card id="Results" title="Results">
<%
Response.ContentType = "text/vnd.wap.wml"
Response.Expires = -1
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Cache-Control", "no-cache, must-revalidate"
Dim objConn
Dim strConnect
Dim rs
Dim strsql
Dim mad



strConnect = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& _
              Server.MapPath("thurs1.mdb")

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open strConnect


strsql ="SELECT * FROM PriceValueInfo Where TickerSymbol = '" & Request.QueryString("Symbol") & "'"

set rs = server.createobject("adodb.recordset")
rs.Open strsql, objConn
rs.movefirst
Do While Not rs.EOF
%>

<p align="left"><small>$(Symbol)</small></p>

<p align="left"><small><%=rs("ShareName")%></small></p>

<p align="left"><small>LastTrade            <%=rs("LastTrade")%></small></p>

<p align="left"><small>Net Change          <%=rs("NetChange")%></small></p>

<p align="left"><small>Prev. Close         <%=rs("PrevClose")%></small></p>

<p align="left"><small>Bid                             <%=rs("Bid")%></small></p>

<p align="left"><small>Ask                          <%=rs("Ask")%></small></p>

<p align="left"><small>Year High              <%=rs("YearHigh")%></small></p>

<p align="left"><small><b>Year Low               <%=rs("YearLow")%></b></small></p>

 
<%
rs.movenext
Loop
rs.close
set rs= nothing

set ObjConn = nothing
%>
</card>
</wml>


Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close