You need to post db questions in the appropriate db forum. PLEASE STOP POSTING YOUR DB QUESTIONS IN THE ASP FORUM.
Jared
Insert data into two table
Collapse
X
-
sql2 has a missing opening parenthesis so would produce "values'shivans usan'" instead of "values ('shivansusan'"
A simple SQL sensibility check would have saved you here:
GazCode:response.write sql2 response.end my_conn.execute(sql2)
Leave a comment:
-
Insert data into two table
Hi!
I have two tables in my database (userinfo, logininfo)
- userinfo table has five fields (uname, pws, con_pws, squest, sans)
- logininfo table has then six fields (fname,lname,do b,add1, add2, country)
I want to insert data in two tables (userinfo, logininfo) using this code:
error - syntax error in INSERT INTOCode:<%sql1="insert into userinfo (uname, pws, con_pws, squest, sans) values ('"&uname&"','"&pws&"','"&con_pws&"','"&squest&"','"&sans&"');" my_conn.execute(sql) sql2="insert into logininfo(fname,lname,dob,add1, add2, country) values'"&fname&"','"&lname&"','"&dob&"','"&add1&"','"&add2&"','"&country&"')" my_conn.execute(sql2) %>
how i slow this problem........ .... ?
pls help me.... and give idea.
thanks,
susanTags: None
Leave a comment: