Please help:
I am sending user input from a Wml card (WAP) to an Asp page but when I press the sent button on my card I get an error. I am using the nokia toolkit. It is as if it cannot load the asp page but I don't think it is an error in my asp page. I think it is the way the values are passed from the wml card, but i'm not sure. I get the following error:
"Cannot load http:.....Zend1.asp (HTTP Error 500)"
Everything is in the right folder and all that.
This is the code for my card:
_________________________________________________
<% Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "<wml>
<card id="Start" title="Journey Planner" newcontext="true">
<p>
<b>Begin:</b>
<input type="text" name="StationName" maxlength="25"/>
<b>End:</b>
<input type="text" name="StationName2" maxlength="25"/>
<do type="accept" label="Begin">
<go href="Zend1.wml" method="post">
<postfield name="StationName" value="$(StationName)"/>
<postfield name="StationName2" value="$(StationName2)"/>
</go>
</do>
</p>
</card>
</wml>
_________________________________________________
This is the .asp file
_____________________________________-
<%Option Explicit%>
<%
'Send MIME type
Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "<wml>
<%
Dim conn 'connection to database
dim SQLquery
dim Sresult
'===========assigning variable to value passed on
Sresult = request("StationName"
Sresult2 = request("StationName2"
'==================Connction to database
set conn = Server.CreateObject( "ADODB.Connection" )
conn.Provider = "MSDataShape"
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("\se402036\db\database.mdb"
& ";"
SQLquery = "SELECT First.StationName AS Start_At, Second.StationName AS Ending_At, Route.ServiceType FROM StopsAt AS First, StopsAt AS Second, Route WHERE First.StationName LIKE '%" & Sresult & "%'AND Second.StationName LIKE '%" & Sresult2 & "%'"
set RSrates = conn.Execute(SQLquery)
if RSrates.eof then
RSrates.close
set RSrates = nothing
%>
<card id="Nodata">
<p align="center"><br/>No data found<br/><br/>
</card>
<%
else
%>
<card id="start" title="Welcome">
<p>
Results:
<% Do While Not RSrates.EOF
response.write RSrates.fields("Start_At"
& " " & RSrates.fields("Ending_At"
& RSrates.fields("ServiceType"
& "<br/>"
RSrates.MoveNext
Loop
%>
</p>
</card>
<%End If%>
</wml>
I am sending user input from a Wml card (WAP) to an Asp page but when I press the sent button on my card I get an error. I am using the nokia toolkit. It is as if it cannot load the asp page but I don't think it is an error in my asp page. I think it is the way the values are passed from the wml card, but i'm not sure. I get the following error:
"Cannot load http:.....Zend1.asp (HTTP Error 500)"
Everything is in the right folder and all that.
This is the code for my card:
_________________________________________________
<% Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "<wml>
<card id="Start" title="Journey Planner" newcontext="true">
<p>
<b>Begin:</b>
<input type="text" name="StationName" maxlength="25"/>
<b>End:</b>
<input type="text" name="StationName2" maxlength="25"/>
<do type="accept" label="Begin">
<go href="Zend1.wml" method="post">
<postfield name="StationName" value="$(StationName)"/>
<postfield name="StationName2" value="$(StationName2)"/>
</go>
</do>
</p>
</card>
</wml>
_________________________________________________
This is the .asp file
_____________________________________-
<%Option Explicit%>
<%
'Send MIME type
Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "<wml>
<%
Dim conn 'connection to database
dim SQLquery
dim Sresult
'===========assigning variable to value passed on
Sresult = request("StationName"
Sresult2 = request("StationName2"
'==================Connction to database
set conn = Server.CreateObject( "ADODB.Connection" )
conn.Provider = "MSDataShape"
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("\se402036\db\database.mdb"
SQLquery = "SELECT First.StationName AS Start_At, Second.StationName AS Ending_At, Route.ServiceType FROM StopsAt AS First, StopsAt AS Second, Route WHERE First.StationName LIKE '%" & Sresult & "%'AND Second.StationName LIKE '%" & Sresult2 & "%'"
set RSrates = conn.Execute(SQLquery)
if RSrates.eof then
RSrates.close
set RSrates = nothing
%>
<card id="Nodata">
<p align="center"><br/>No data found<br/><br/>
</card>
<%
else
%>
<card id="start" title="Welcome">
<p>
Results:
<% Do While Not RSrates.EOF
response.write RSrates.fields("Start_At"
RSrates.MoveNext
Loop
%>
</p>
</card>
<%End If%>
</wml>