J
jeef
I have a problem inserting items into a database.
My code is below. What happens is sometimes it brings up and error
then if i hit refresh it goes through, but it wont enter my
information into the database. It enters a row and doesnt put anything
into it.
conn = "Provider=SQLOLEDB.1;Data Source=smithweb2; Initial
Catalog=i65sales; Persist Security Info=False;User ID=test;Password="
'Application("conn")
Set sqlstring = Server.CreateObject("ADODB.Connection")
sqlstring.Open conn
SQL = "INSERT INTO i65 (itemid, itemname, description, price, group1,
group2, group3, thumbnail, picture, weight) VALUES ('" & itemid &
"','" & itemname & "','" & description & "',Convert(money,'" & price &
"'),'" & group1 & "','" & group2 & "','" & group3 & "','" & thumb &
"','" & picture & "','" & weight & "')"
sqlstring.Execute(SQL)
Response.Redirect "didit.asp"
Here is my output whenever i have it write it out:
INSERT INTO i65 (itemid, itemname, description, price, group1, group2,
group3, thumbnail, picture, weight) VALUES
('test','test','test',Convert(money,'12'),'Universal','Exterior','Cleaner','test','test','1')
My code is below. What happens is sometimes it brings up and error
then if i hit refresh it goes through, but it wont enter my
information into the database. It enters a row and doesnt put anything
into it.
conn = "Provider=SQLOLEDB.1;Data Source=smithweb2; Initial
Catalog=i65sales; Persist Security Info=False;User ID=test;Password="
'Application("conn")
Set sqlstring = Server.CreateObject("ADODB.Connection")
sqlstring.Open conn
SQL = "INSERT INTO i65 (itemid, itemname, description, price, group1,
group2, group3, thumbnail, picture, weight) VALUES ('" & itemid &
"','" & itemname & "','" & description & "',Convert(money,'" & price &
"'),'" & group1 & "','" & group2 & "','" & group3 & "','" & thumb &
"','" & picture & "','" & weight & "')"
sqlstring.Execute(SQL)
Response.Redirect "didit.asp"
Here is my output whenever i have it write it out:
INSERT INTO i65 (itemid, itemname, description, price, group1, group2,
group3, thumbnail, picture, weight) VALUES
('test','test','test',Convert(money,'12'),'Universal','Exterior','Cleaner','test','test','1')