Jump to content

OMG. HELP me Plz. i duno what happen in the whole thing for my project and submission is tml.. T.T


ttwkeni

Recommended Posts

hi.. i'm reli desperate for help what really happened to my codings? i duno. My asp got so bad. and my submission is due in 8hours time. haven been gotten engh sleep. theres alwy a sytnx error in my asp. which say Syntax error in INSERT INTO statement./Copy/main1.asp, line 21this is my codes<%dim sql, conn, rsset conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("fastfood.mdb"))%><html><head><title>User Login</title></head><body><%if Request.Form("userName")="" or Request.Form("add")="" or Request.Form("phone")="" then response.redirect("main.html")else sql="INSERT INTO McUser(userName, phone, add)" sql=sql&"VALUES" sql=sql&" ( ' " & request.form("userName") & " ' , " sql=sql& " ' " & request.form("phone") & " ' , " sql=sql& " ' " & request.form("add") & " ' ) " Session("userName") = request.form("userName") conn.Execute sql, recaffected conn.close response.redirect("order.html")end if%> </body></html>what happen? :)

Link to comment
Share on other sites

Error is possibly because of spaces in the preparing sql query....Try this...sql="INSERT INTO McUser(userName, phone, add)"sql=sql& " VALUES "sql=sql& "('" & request.form("userName") & "',"sql=sql& "'" & request.form("phone") & "',"sql=sql& "'" & request.form("add") & "')"

Link to comment
Share on other sites

ok thanz alot. nw problem after problem. :) .. it's already 3.3am down here... things are working just fine. However, from that codings, when doing registration, nothing went into my data base man. Meaning that i open my fastfood.mdb. nothing is there. when i open the McUser Table. No data nothing. and i wonder y.. - . -

Link to comment
Share on other sites

still no good :< ... when i enter userName=A phone=2 add=A at register screen. It move on to shopping cart. However, when i see fastfood mdb. still cant find any item listed in McUser. it shld be listed userName=A phone=2 add=A in the database rite? but it's just plain piece of table - . -

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...