<% Dim Category 
Dim Description 
Dim cn 
Dim sql 
Category = request.form("txtCategory") 
Description = request.form("txtDescription") 
Set cn = Server.CreateObject("ADODB.Connection") 
cn.Open "NorthWindDSN" 
sql = "INSERT INTO Categories (CategoryName, Description) "  
sql = sql & " values( '" & Category & "' , '"  
sql = sql & Description & "' )" 
cn.Execute(sql) 
Response.write "You have successfully inserted a new record." 
cn.Close 
Set cn = nothing %> 

 

Click Next for amend-select.asp