asp与数据库通信出现问题
我想通过asp接收由flash传送过来的userid和pwd变量(方法是flash用loadVariables( "http://localhost/return.asp?userid=````&pwd=```` ", "GET "))
然后打开http://localhost/users.mdb进行查找,看是否存在同时满足两个变量的一行.如果有,则int_ifhas变量+=1最后返回int_ifhas变量的值.(实际上是验证用户登陆的一个asp)
我的代码是这样写的:
<%@ language= "JScript " %>
<%
var str_Msg = "Sorry! Your request tread awry. ";
var str_getask= Request.QueryString( "ask ");
var str_getid= Request.QueryString( "userid ");
var str_getpwd= Request.QueryString( "pwd ");
//声明并定义接受请求的变量
var int_ifhas=0;
StrConnect = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=http://localhost/users.mdb ";
set conn = Server.CreateObject( "ADODB.Connection ");
conn.open StrConnect;
SQL=Server.CreateObject( "ADODB.Recordset ");
SQL.Open "list1 ", StrConnect, 1,2,3;
While NOT SQL.EOF
' says to do this as long as we haven 't reached the end of the file
if(str_getid==SQL( "username ")&&str_getpwd==SQL( "password "){
int_ifhas+=1;
}
SQL.MoveNext;
Wend ;
///
Response.write( "output= " + int_ifhas);
%>
但是运行后发现有错:
==============
错误类型:
Microsoft JScript 编译错误 (0x800A03EC)
缺少 '; '
/return.asp, line 12, column 4
set conn = Server.CreateObject( "ADODB.Connection ");
---^
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)
网页:
GET /return.asp
====================
请问有那些问题呢?
如果要实现我刚才说的效果,该怎么写呢?
------解决方案--------------------asp服务器端我用vb的。
不好意思。
------解决方案--------------------我是用VBS的。
JS也用Set的吗?
------解决方案-------------------- <%@ language= "JScript " %>
你这个是JS,我也不会,帮顶