SteveH
01-04-2008, 02:05 PM
Hello
I have the following ASP script which gets form field data from a Flash site (where the variables have been named as follows: name,email,business,country,message.
However, when I complete the online form myself, no data is entered into my MS Access database. The path to the database is correct.
When I look at my .asp file on the server I get the following error message:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'SQL'
/ASPflash/flashEmailTest.asp, line 22
These error messages (I previously got error messages saying conn, rs, etc were not defined, so I have defined them) seem to hide something deeper.
Can I ask what is likely to be the problem here?
The code is below.
Many thanks for any help.
Steve
<%
Dim conn,rs,name,email,business,country,message
name = Request.Form("name")
email = Request.Form("email")
business = Request.Form("business")
country = Request.Form("country")
message = Request.Form("message")
'Open MS Access database, store form field values, and close
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\Flashform.mdb;"
set rs = Server.CreateObject("ADODB.recordset")
SQL="INSERT INTO users (name, email, business, country, message) VALUES ('" & _
name & "', '" & email & "','" & business & "', '" & country & "', '" & message & "')"
rs.Open SQL, conn
Set rs=Nothing
conn.Close
Set conn=Nothing
%>
I have the following ASP script which gets form field data from a Flash site (where the variables have been named as follows: name,email,business,country,message.
However, when I complete the online form myself, no data is entered into my MS Access database. The path to the database is correct.
When I look at my .asp file on the server I get the following error message:
Microsoft VBScript runtime error '800a01f4'
Variable is undefined: 'SQL'
/ASPflash/flashEmailTest.asp, line 22
These error messages (I previously got error messages saying conn, rs, etc were not defined, so I have defined them) seem to hide something deeper.
Can I ask what is likely to be the problem here?
The code is below.
Many thanks for any help.
Steve
<%
Dim conn,rs,name,email,business,country,message
name = Request.Form("name")
email = Request.Form("email")
business = Request.Form("business")
country = Request.Form("country")
message = Request.Form("message")
'Open MS Access database, store form field values, and close
set conn=Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};DBQ=D:\Flashform.mdb;"
set rs = Server.CreateObject("ADODB.recordset")
SQL="INSERT INTO users (name, email, business, country, message) VALUES ('" & _
name & "', '" & email & "','" & business & "', '" & country & "', '" & message & "')"
rs.Open SQL, conn
Set rs=Nothing
conn.Close
Set conn=Nothing
%>