紧急求助,谢谢啦
我在服务器上的database目录下有一个database.mdb的access数据库文件,系统总是提示说没有定义SERVER.请问脚本文件这样写有没有什么问题?请指点,谢谢!
<script language="javascript" >
function showpagecounterman()
{
var truename=showModalDialog("staff_select.asp");
this.form1.counterman_now.value=truename;
var db="../database/database.mdb";
var Conn = Server.CreateObject("ADODB.Connection");
Conn.Provider = "Microsoft.Jet.OLEDB.4.0";
Conn.ConnectionString ="Data Source=" + "Server.MapPath("+db+")";
Conn.open;
var dbrse="SELECT * FROM [STAFF] WHERE USERNAME='yangp'";
var rs = Server.CreateObject("ADODB.Recordset");
rs.Open(dbrse,Conn,1,1);
this.form1.buttoncounterman.value = rs.Fields("truename");
this.refresh;
}
</script>