home *** CD-ROM | disk | FTP | other *** search
- <%@ LANGUAGE="VBSCRIPT" %>
- <html>
- <head>
- <title>Save Registration Form</title>
- </head>
- <body bgcolor="#FFFFFF">
- <%
- Error = False
- If Not IsNumeric(Request.Form("Number")) Then
- Response.Write "<h2>Course Number has to be a Number</h2>"
- Error = True
- End If
-
- If Not IsNumeric(Request.Form("Cost")) Then
- Response.Write "<h2>Cost has to be a Number</h2>"
- Error = True
- End If
-
- If Not IsNumeric(Request.Form("Duration")) Then
- Response.Write "<h2>Duration has to be a Number</h2>"
- Error = True
- End If
-
- If Not Error Then
-
-
- Set Conn = Server.CreateObject("ADODB.Connection")
-
- Set Cmd = Server.CreateObject("ADODB.Command")
-
- Set RSCourse = Server.CreateObject("ADODB.Recordset")
-
- SQL = "Select * From Course"
-
- Cmd.CommandText = SQL
- Cmd.CommandType = 1
-
- Set Cmd.ActiveConnection = Conn
-
- RSCourse.Open Cmd, , 1, 3
-
- RSCourse.AddNew
-
- RSCourse("Category") = Request.Form("Category")
- RSCourse("Title") = Request.Form("Title")
- RSCourse("Number") = Request.Form("Title")
- RSCourse("Description") = Request.Form("Description")
- RSCourse("Audience") = Request.Form("Audience")
- RSCourse("Prerequisites") = Request.Form("Prerequisites")
- RSCourse("Cost") = Request.Form("Cost")
- RSCourse("Duration") = Request.Form("Duration")
- RSCourse.Update
-
- RSCourse.Close
-
- Response.Write "<h1>Record Added</h1>"
-
- End If
- %>
- </body>
- </html>