codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  urgent!Need help please.......  lohshu at 12:46 on Tuesday, September 07, 2004
 

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.


  Re: urgent!Need help please.......  Yusairi at 13:54 on Tuesday, September 07, 2004
 

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 '.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Main Method?
•  Learning Perl
•  Re: dynamic crystal report generation
•  Re: Generating sound using VB code
•  Getting data
•  Re: text and jpeg
•  HELP! 3-frame dilemma for troubleshooter
•  Components - Property window
•  Re: How to create a data structure that represent a EMPLOYEE???


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006