|
here is my wml file and asp program.
<b>wml file</b>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="card1" title="Hotel Booking" newcontext="true">
<do type="options" label="Main Page">
<go href="services.wml"/>
</do>
<p>
Please enter your name:<input type="text" name="User_name"/>
<br/>
Plase enter your IC/Passport No:<input type="text" name="ic"/>
<br/>
Please choose room type:
<select name="roomtype">
<option value="superior">Superior Room</option>
<option value="deluxe">Deluxe Room</option>
<option value="standard">Standard Room</option>
</select>
<br/>
Please enter room quantity:<input type="text" name="qty"/>
<do type="accept" label="Book">
<go method="get" href="/asp/book.html">
<postfield name="customer" value="$(User_name)"/>
<postfield name="icNo" value="$(ic)"/>
<postfield name="roomType" value="$(roomtype)"/>
<postfield name="roomQty" value="$(qty)"/>
</go>
</do>
</p>
</card>
</wml>
<b>asp file</b>
<%Response.ContentType="text/vnd.wap.wml"%>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
"http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="card1" title="Services">
<p>
<%
Dim conn,sql,rs,customer,IC_No,roomType,roomQty,memberid
Set conn=Server.CreateObject("ADODB.Connection")
conn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\inetpub\wwwroot\it3825\asp\project.mdb;"
customer=request.querystring("customer")
IC_No=request.querystring("icNo")
roomType=request.querystring("roomType")
roomQty=request.querystring("roomQty")
memberid=Session("user")
sql="INSERT INTO hotelBooking(customer,IC_No,roomType,roomQty,UserID) VALUES ('"&customer&"','"&IC_No&"','"&roomType&"','"&roomQty&"',"&memberid&")"
set rs=conn.Execute(sql)
%>
Your booking successful already.
</p>
</card>
<%
rs.close
conn.close
set rs=nothing
%>
</wml>
when i run this program,the error message(please use udtable query)
Can anyone help us to solve this problem?
Thanks alot.
|
|
|
hi lohshu,
i had review your wml + asp code.
it doesn't seem to be wrong.
unfortunately, you need to check out back
your project.mdb, maybe you have this udtable
query integrate with table hotelBooking while
inserting. or maybe your member session.
you need to check one by one your code to trace back
what is the problem.
by i'm prefer you checked again your database design.
good luck.
<Added>
just curious :
check out again your sql insert statement.
maybe you had missing " or '.
|
|
|
|
|
|
|
|
|
|