HELLO,
I am trying to create a flash form that would input data to a SQL database via an ASP.NET action page. I would like for this page to return a success or failed message to the SWF.
Can anyone help with this? Or is this even possible ?
My code for the aspx page is as follows;
<%@ Page language=“c#” AutoEventWireup=“false” %>
<% @Import Namespace=“System.Data.SqlClient” %>
<%
string connectionString;
string lst_ID, lst_email, news, billing;
lst_ID = Request[“lst_username”];
lst_email = Request[“lst_email”];
news = Request[“news”];
billing = Request[“billing”];
connectionString = “SERVER=blah;UID=;PWD=me;DATABASE=huh”;
SqlConnection sqlCon = new SqlConnection(connectionString);
//string query = “insert into newsAndBilling (list_username, list_email, news, billing) values (’”+lst_username+"’, ‘"+lst_email+"’, “+news+”, “+billing+”;";
string query = “insert into newsAndBilling (list_username, list_email, news, billing) values (‘me’, '[email protected], 0, 1);”;
SqlCommand sqlCom = new SqlCommand(query,sqlCon);
sqlCon.Open();
SqlDataReader dr = sqlCom.ExecuteReader();
while (dr.Read())
{
Response.Write(“success”);
}
dr.Close();
sqlCon.Close();
%>
Many Thanks in advance
:}