Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp newbee insert into question 1

Status
Not open for further replies.

rochnn

Technical User
Sep 16, 2006
9
US

I am trying to learn asp. I was building my first form and I came across a problem How do I do a insert sql statement
Code:
insert color, height, weight into descriptions
 
something like this:
Code:
dim sql, con
set con = server.createobject("ADODB.connection")
con.open "put the connection string to your database here"
sql = " INSERT INTO tablename(field1, field2, field3)" &_
      " VALUES ('"&request.form("val1")&"'," &_
      " '"&request.form("val2")&"'," &_
      " '"&request.form("val3")&"') "
con.execute(sql)

-DNG

 
thank you DotNetGnat that is exactly what I was looking for. I created my whole input and works great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top