Did you never want to have a login entrance to your flash site? Here it is the ASP code you need to communicate from flash to the access database.
<%@LANGUAGE=”VBSCRIPT” CODEPAGE=”1252″%>
<%
‘open the database——————————————————
set conn=server.createobject(“adodb.connection”)
cnpath=”DBQ=” & server.mappath(“mydb.mdb”)
conn.open “DRIVER={Microsoft Access Driver (*.mdb)}; ” & cnpath
‘Vars from Flash———————————
login = trim(request(“login”))
senha = trim(request(“senha”))
‘Checks login and password values ————————————–
SQL = “SELECT * FROM LOGIN ”
SQL = SQL & “WHERE login =’”& login &”‘ AND senha =’”& senha &”‘”
Set busca = conn.Execute(SQL)
if not busca.eof then
response.write “ok=true”
else
response.write “ok=false”
end if
‘close conn —————————————————–
set busca = nothing
conn.close
%>
For this issue you can use the code of my previous post regarding asp scripts to use with flash.
Hope you enjoy.
Tags: access, actionscript 2, AS2, ASP, code, data, database, Flash, login, password, Source, Tips
| Copy and Paste the code below | |
| Email and IM | |
| Websites | |
| Forums | |
follow:
March 6th, 2007 at 6:37 pm
Thats cool im tryin to get a longon in using micrsoft access thanx for the help
August 1st, 2007 at 12:18 pm
Thanks for posting up your work, it’ll be really useful for me as well as a few other people I know.
September 30th, 2008 at 2:17 am
This is great finally got flash to work with asp, thanks a bunch.