Flash+ASP+SQL Problem

Hi,

I have to connect flash to database as SQL. For that I have used ASP as middleware.
I am able acces my data through ASP that means there is no problem with ASP->SQL connection.

Now my problem is if I am passing login name and password from swf to ASP and then checking in SQL database. I am not getting the output I want.

In my SWF there are two fields
1)Login:uname
2)Password:pword
3)Button:go_btn

On frame 1 I’ve written the code as:

login.swf

//function to check the login
stop();
function doLogin() {
var sendLogin:LoadVars = new LoadVars();
sendLogin.uname = _root.uname.text;
sendLogin.pword = _root.pword.text;
var logInReply:LoadVars = new LoadVars();
logInReply.onLoad = function(success) {
if (successs) {
if (logInReply.answer=“ok”) {
//“status” is the instance name of the status text box
_root.status1.text = “Login Successful”;
} else {
_root.status1.text = “Login Failed”;
}
}
};
sendLogin.sendAndLoad(“login1.asp”, logInReply, “POST”);
}
_root.go_btn.onRelease = doLogin;

And in ASP page I have written code as:

<%@ Language=VBScript %>
<!–#include file=“adovbs.inc” -->
<%
Dim strUsername
Dim Pwd
response.write(“login”)
strUsername = Request.form(“uname”)
Pwd = Request.form(“pword”)
Set conn = Server.CreateObject(“ADODB.Connection”)
conn.Open “Driver={Sql Server};Server=PRIMEDIADC;uid=sa;pwd=;database=try”
Set rs = Server.CreateObject(“ADODB.RecordSet”)
query = “SELECT * FROM tbl_admin WHERE user_name=’” & strUsername & “’ AND password=’” & Pwd & “’”
Set rs = conn.Execute(query)
if rs.eof then
conn.Close
Set rs = Nothing
Set conn = Nothing
response.write("&answer=failed")
else
Session(“member”) = rs(“user_name”)
Session.Timeout = 20
rs.close
set conn = nothing
set rs = nothing
response.write("&answer=ok")
End If
%>


What is the problem behind this? can anybody help me please…