Hey,
I am having a problem getting a variable from send from ASP to Flash. Everything else works i can actualy POST vars from flash to ASP the to ms Access but at the end of adding a new usr password and type i would like to check if i get back a value posted from asp. I have created something similar before and it works great. i just can not find whats wrong in this one. Any help at all would be great. Here is the ASP and AS2.0
Code:
<%
Dim UserName, Password, usrType
UserName = trim(request("flaUser"))
usrPass = trim(request("flaPass"))
usrType = trim(request("flaType"))
Dim cn2
set cn2=Server.CreateObject("ADODB.Connection")
cn2.Provider="Microsoft.Jet.OLEDB.4.0"
DSNtemp = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\Database\Somedata.mdb; User Id=Admin; Password=")
cn2.Open DSNtemp
SQLstmt = "INSERT INTO Users (UserName, usrPass, Type) VALUES ('" & UserName & "', '" & usrPass & "', '" & usrType & "')"
cn2.execute SQLstmt
cn2.close
set cn2 = nothing
'set SQLstmt = nothing
Dim mainMessage
mainMessage="message1=1"
response.Write(mainMessage)
%>
Code:
_root.btnAdd.onRelease = function() {
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function() {
if (this.message1 == "1") {
_root.txtError.text = "Added";
} else {
_root.txtError.text = "Cound Not add record!!!!" + message1.text;
}
};
var send_lv:LoadVars = new LoadVars();
send_lv.flaUser = _root.txtUser.text;
send_lv.flaType = _root.txtType.text;
send_lv.flaPass = _root.txtPass.text;
send_lv.sendAndLoad("addrow.asp",result_lv,"POST");
};
Thanks in advance
ASP: