On the ASP side I use
Request("VarFromFlash")
Request("namefirst1")
cmd.CommandText = "Insert into Sample (namefirst, namelast, position)
values('" & Request("namefirst1") &"','yourtime','email')"
I use a regular HTML form to test the server script. This makes it easier
for me to debug the server script as the error message show up readily.
Once that is working, then Flash is really a plug-in (once you got the code
template down).
--
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] "SteveW" <Stevewarby@btinternet.com> wrote in message
news:e25s9t$97d$1@forums.macromedia.com...
I have a simpler app as per the example as follows:
var submitListener:Object = new Object();
submitListener.click = function(evt:Object) {
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function(success:Boolean) {
if (success) {
result_ta.text = result_lv.welcomeMessage;
} else {
result_ta.text = "Error connecting to server.";
}
};
var send_lv:LoadVars = new LoadVars();
send_lv.name = name_ti.text;
send_lv.sendAndLoad("
http://81.97.3.2/cart1/cactushop5_1/employee2.asp",
result_lv, "POST");
};
submit_button.addEventListener("click", submitListener);
Employee2.asp as follows:
<%@Language="VBScript"%>
<%
Dim cn
Dim cmd
Dim rs
Dim cont
Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionString = "driver={MySQL ODBC 3.51
Driver};server=81.97.3.2;uid=XXX;pwd=XXXXX;database=test;OPTION=3"
cn.Open
Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = cn
cmd.CommandType = 1
namefirst1 = result_ta
'Response.Write "NameFirst"
cmd.CommandText = "Insert into Sample (namefirst, namelast, position)
values('"&namefirst1&"','yourtime','email')"
Set rs = cmd.Execute
Response.Write "writing=Ok"
cn.Close
%>
When I run the app I get a new record with
namelast as yourtime
Position as email
namefirst as 'blank'
I am therefore not reading 'namefirst1= result_ta' or the variable is not
being passed from within flash.
Any ideas??