•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 427,759 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,692 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 4773 | Replies: 6
![]() |
•
•
Join Date: Feb 2006
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
Hi guys, i hope u can help me solve this prob of mine. Im currently werking on this project and somehow im unable to insert this data into my database eventhough the data was being retrieved. Can anione help
<% option explicit %>
<% response.buffer = true %>
<%
Dim conn, recaffected, sql, qty, increment, updated, objRS, objRS2, name, productid
qty=1
increment=0
updated=0
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("dbProduct.mdb"))
set objRS = Server.CreateObject("ADODB.recordset")
set objRS2 = Server.CreateObject("ADODB.recordset")
objRS.Open "SELECT * FROM OrderTable WHERE shopperid=" & session("shopperid")" , conn
objRS2.Open "SELECT * FROM Product WHERE productid=" & request.querystring("productid"), conn
sql="INSERT INTO OrderTable(shopperid, productid, qty, increment, updated, pdt, startbid1)"
sql=sql & " VALUES "
sql=sql & "(" & session("shopperid") & ", "
sql=sql & objRS2("productid") & ", "
sql=sql & qty & ", "
sql=sql & increment & ", "
sql=sql & updated & ", "
sql=sql & objRS2("name") & ", "
sql=sql & objRS2("startbid") & ") "
on error resume next
response.Write(sql)
response.end
conn.Execute sql, recaffected
if err<>0 then
response.write("<br>Product is already included, <a href='desc2.asp'>try again</a>.")
else
response.redirect("buy2.asp")
end if
objRS.close
objRS2.close
conn.close
%>
Is it bcos of the session??
<% option explicit %>
<% response.buffer = true %>
<%
Dim conn, recaffected, sql, qty, increment, updated, objRS, objRS2, name, productid
qty=1
increment=0
updated=0
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("dbProduct.mdb"))
set objRS = Server.CreateObject("ADODB.recordset")
set objRS2 = Server.CreateObject("ADODB.recordset")
objRS.Open "SELECT * FROM OrderTable WHERE shopperid=" & session("shopperid")" , conn
objRS2.Open "SELECT * FROM Product WHERE productid=" & request.querystring("productid"), conn
sql="INSERT INTO OrderTable(shopperid, productid, qty, increment, updated, pdt, startbid1)"
sql=sql & " VALUES "
sql=sql & "(" & session("shopperid") & ", "
sql=sql & objRS2("productid") & ", "
sql=sql & qty & ", "
sql=sql & increment & ", "
sql=sql & updated & ", "
sql=sql & objRS2("name") & ", "
sql=sql & objRS2("startbid") & ") "
on error resume next
response.Write(sql)
response.end
conn.Execute sql, recaffected
if err<>0 then
response.write("<br>Product is already included, <a href='desc2.asp'>try again</a>.")
else
response.redirect("buy2.asp")
end if
objRS.close
objRS2.close
conn.close
%>
Is it bcos of the session??
•
•
•
•
Originally Posted by conspiringfate
ok dude.. . email me.. .lets fix this... i understand your problem but i really dont wanna type out the code
Why not help her solve the problem here? If so then everyone else will have the opportunity to see the solution and learn something...
•
•
Join Date: Dec 2003
Location: Marin County, CA
Posts: 6,439
Reputation:
Rep Power: 18
Solved Threads: 339
•
•
•
•
Originally Posted by conspiringfate
waits for email! lol
Thanks in advance for understanding.
"May the Wombat of Happiness snuffle through your underbrush."
- Ancient Aborigine blessing
Please do not contact me by email or PM for help. We're all volunteers here, and only have so much free time to dedicate to our efforts.
However, if I've been working on a thread with you already, and seem to have "forgotten" your thread, please do send me a message. I try not to let things slip through the cracks, but it does happen sometimes.
- Ancient Aborigine blessing
Please do not contact me by email or PM for help. We're all volunteers here, and only have so much free time to dedicate to our efforts.
However, if I've been working on a thread with you already, and seem to have "forgotten" your thread, please do send me a message. I try not to let things slip through the cracks, but it does happen sometimes.
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
access avatar backup breach broadband code combo crime daniweb data data protection data transfer database design drive dropdownlist forensics government hacker hard hardware hitachi ibm internet linux medicine module net news normalization reuse security server sql storage survey terabyte web wikipedia
- How to insert data into database? (JSP)
- insert data from one form into two diffent database table (JSP)
- how to insert data from dataset into database (VB.NET)
- How to insert data in one column in database? (ColdFusion)
- Inserting Data into Access Database (Java)
- Unable to insert data into SQL Database (ASP)
- Posting form data to an Oracle database (JavaScript / DHTML / AJAX)
Other Threads in the MySQL Forum
- Previous Thread: Java Connection
- Next Thread: Appeal by shameless newbie - Mandrake 10 + MySQL 5



Linear Mode