Insert ASP Code
<% 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
- Installing the Personal Web Server (PWS)
- or Internet Information Services (IIS)
- Create the Example ASP Files
- Create a DSN Connection
- Connect to the Database
- Modify Access Data Online
- Inserting Data
- Modifying Data
- Deleting Data
- Data Insert Form








No comments:
Post a Comment
Comments subject to moderation before publishing.