PDA

View Full Version : flash intregating database through asp


msrajani
05-21-2006, 02:26 AM
hi,
i am developing app in flash that export data from flash to MS Access.
when i tested my app it gives error in my asp script.here is my asp script please tell me what is the mistake.



<%@language = "vbscript"%>
<%
strfirstname = request.Form("fname")
strlastname = request.Form("lname")
stremail = request.Form("email")
strmessage = request.Form("message")

response.write(strfirstname) & "<br>"
response.write(strlastname) & "<br>"
response.write(stremail) & "<br>"
response.write(strmessage)

MyPath=Server.MapPath("data.mdb")
set conn = Server.CreateObject("ADODB.Connection") '
conn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & MyPath

SQL = "INSERT INTO contacts(FirstName,LastName,Email,Message) VALUES
('"&strFirst&"','"&strLast&"','"&strEmail&"','"&Message&"')"
conn.Execute(SQL)
%>

msrajani
06-01-2006, 08:46 AM
strfirstname = request.Form("fname")
strlastname = request.Form("lname")
stremail = request.Form("email")
strmessage = request.Form("message")

SQL = "INSERT INTO contacts(FirstName,LastName,Email,Message) VALUES
('"&strFirst&"','"&strLast&"','"&strEmail&"','"&Message&"')"
conn.Execute(SQL)
%>

SQL = "INSERT INTO contacts(FirstName,LastName,Email,Message) VALUES
('"&strfirstname&"'.'"&strlastname&"','"&stremail&"','"&strmessage'")"

Cota
06-01-2006, 02:30 PM
what was the error message?