- Applicaiotn
- Methods
- Events
- Contents
- StaticObjects
- Request
- ClientCertificate
- Cockies
- Forms
- QueryString
- ServerVariables
- Response
- Server
- Session
|
Here's the Server
Side VBScript/ADO and SQL Syntax <%@ LANGUAGE=VBScript %>
<!-- Add server-side script for ADO Application -->
<!-- Server-side script for Activex Data Object -->
<%
frmRestime = Request.Form("restime")
frmEase = Request.Form("ease")
frmInteractive = Request.Form("interactive")
frmUseful = Request.Form("useful")
If Not IsEmpty(frmRestime) And _
Not IsEmpty(frmEase) And _
Not IsEmpty(frmInteractive) And _
Not IsEmpty(frmUseful) Then
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionTimeout = Application("Fort_ConnectionTimeout")
conn.CommandTimeout = Application("Fort_CommandTimeout")
On Error Resume Next
conn.Open Application("Fort_ConnectionString"), _
Application("Fort_RuntimeUserName"), _
Application("Fort_RuntimePassword")
strSQL = "INSERT INTO feedback " & _
"(Response, Useful, Interactive, Ease)" & _
" VALUES(" & frmRestime & "," & frmUseful & _
"," & frmInteractive & "," & frmEase & ")"
conn.Execute(strSQL)
'-- Check that record was added successfully
if err.number <> 0 then
session("ErrorTitle") = "feedback.asp"
session("ErrorText") = "err.description" & _
" not be entered because of the following" & _
" unexpected error:<p>"&err.description
response.redirect "error.asp"
end if
Response.Write "Thank you! Your feedback has been recorded and "
Response.Write "will help us make improvements in the future."
Response.End
Else
%>
<html> (This code goes before html tag begins)
<head>(After this you can use VBScript or Javascript to
use DOM) |