Snapa01
08-29-2001, 03:58 PM
Okay, I have tried everything I can think of and a bunch of stuff other people have thought of as well. I have read a bunch of tutorials and I have tried suggestions from other forums. I am not having any luck with this. Can anyone PLEASE, help me out??? Tell me what I am doing wrong??
I have a form created in Flash that I am trying to send to my maintenance database. The form has a submit button and I have put the following actionscript in it to send the data over to the ASP:
on (release) {
loadVariablesNum ("Input.asp", 0, "POST");
}
on (release) {
gotoAndPlay ("AllEquipment", 1);
}
Below is the ASP page:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<% dim cn
dim rs
dim cmd
dim SQL
dim Asset
dim Location
dim Eqtype
dim Manufacturer
dim Model
dim Serial
dim Opstat
dim Sparecode
dim Vendor
dim Respons
dim Notes
dim Purchasedt
dim Startdt
dim Warranty
Asset = Request("Asset", "'", "'")
Location = Request("Location", "'", "'")
Eqtype = Request("Eqtype", "'", "'")
Manufacturer = Request("Manufacturer", "'", "'")
Model = Request("Model", "'", "'")
Serial = Request("Serial", "'", "'")
Opstat = Request("Opstat", "'", "'")
Sparecode = Request("Sparecode", "'", "'")
Vendor = Request("Vendor", "'", "'")
Respons = Request("Respons", "'", "'")
Notes = Request("Notes", "'", "'")
Purchasedt = Request("Purchasedt", "'", "'")
Startdt = Request("Startdt", "'", "'")
Warranty = Request("Warranty", "'", "'")
%>
<%
const adUseClient = 3
set cn = Server.CreateObject("ADODB.Connection")
cn.Provider="SQLOLEDB"
cn.ConnectionString="data source=sqlserver;user id=sa;password=;initial catalog=maintenance;"
cn.Open
set cmd=Server.CreateObject("ADODB.Command")
%>
<%rs.Open sql%>
<%
SQL = "INSERT INTO Maintenance ([Asset],[Location],"&_
" [Eqtype],[Manufacturer],[Model],[Serial],[Opstat],"&_
" [Vendor],[Sparecode],[Respons],[Notes],[Purchasedt], "&_
" [Startdt],[Warranty])VALUES('" & Asset &"',"&_
" '" & Location &"','" & Eqtype &"',"&_
" '" & Manufacturer &"','" & Model &"','" & Serial &"',"&_
" '" & Opstat &"','" & Vendor &"','"& Sparecode &"',"&_
" '" & Respons &"','" & Notes &"','" & Purchasedt &"',"&_
" '" & Startdt &"','" & Warranty & "');"
%>
<%
set rs=Server.CreateObject("ADODB.RecordSet")
with rs
.ActiveConnection=cn
.PageSize = 18
.MaxRecords = 500
.CacheSize = 10
.CursorType=adOpenStatic
.CursorLocation = adUseClient
end With
%>
<%
rs.Close
set rs = nothing
cn.Close
set cn = nothing
%>
Thank you for any replies or suggestions you may have.
Jalon
I have a form created in Flash that I am trying to send to my maintenance database. The form has a submit button and I have put the following actionscript in it to send the data over to the ASP:
on (release) {
loadVariablesNum ("Input.asp", 0, "POST");
}
on (release) {
gotoAndPlay ("AllEquipment", 1);
}
Below is the ASP page:
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<% dim cn
dim rs
dim cmd
dim SQL
dim Asset
dim Location
dim Eqtype
dim Manufacturer
dim Model
dim Serial
dim Opstat
dim Sparecode
dim Vendor
dim Respons
dim Notes
dim Purchasedt
dim Startdt
dim Warranty
Asset = Request("Asset", "'", "'")
Location = Request("Location", "'", "'")
Eqtype = Request("Eqtype", "'", "'")
Manufacturer = Request("Manufacturer", "'", "'")
Model = Request("Model", "'", "'")
Serial = Request("Serial", "'", "'")
Opstat = Request("Opstat", "'", "'")
Sparecode = Request("Sparecode", "'", "'")
Vendor = Request("Vendor", "'", "'")
Respons = Request("Respons", "'", "'")
Notes = Request("Notes", "'", "'")
Purchasedt = Request("Purchasedt", "'", "'")
Startdt = Request("Startdt", "'", "'")
Warranty = Request("Warranty", "'", "'")
%>
<%
const adUseClient = 3
set cn = Server.CreateObject("ADODB.Connection")
cn.Provider="SQLOLEDB"
cn.ConnectionString="data source=sqlserver;user id=sa;password=;initial catalog=maintenance;"
cn.Open
set cmd=Server.CreateObject("ADODB.Command")
%>
<%rs.Open sql%>
<%
SQL = "INSERT INTO Maintenance ([Asset],[Location],"&_
" [Eqtype],[Manufacturer],[Model],[Serial],[Opstat],"&_
" [Vendor],[Sparecode],[Respons],[Notes],[Purchasedt], "&_
" [Startdt],[Warranty])VALUES('" & Asset &"',"&_
" '" & Location &"','" & Eqtype &"',"&_
" '" & Manufacturer &"','" & Model &"','" & Serial &"',"&_
" '" & Opstat &"','" & Vendor &"','"& Sparecode &"',"&_
" '" & Respons &"','" & Notes &"','" & Purchasedt &"',"&_
" '" & Startdt &"','" & Warranty & "');"
%>
<%
set rs=Server.CreateObject("ADODB.RecordSet")
with rs
.ActiveConnection=cn
.PageSize = 18
.MaxRecords = 500
.CacheSize = 10
.CursorType=adOpenStatic
.CursorLocation = adUseClient
end With
%>
<%
rs.Close
set rs = nothing
cn.Close
set cn = nothing
%>
Thank you for any replies or suggestions you may have.
Jalon