求教连接ASP连接数据库的问题,很急
我做一个网站,在我的笔记本上用127.0.0.1调试一切正常,我把做好的网站放在服务器上时(服务器是私有的,IP也是有的)就出现了数据库访问的错误:
错误类型:
Microsoft JET Database Engine (0x80004005)
操作必须使用一个可更新的查询。
/userman/findhistory.asp, 第 55 行
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
我的findhistory.asp有关数据库的代码是:
filePath = Server.MapPath("../fpdb/userdata.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filePath
sql = "select * from userinfo where 用户帐号 ="
sql = sql & sqlstr(loguserid) & "and 用户口令 ="
sql = sql & sqlstr(password)
set objuser = conn.Execute(sql)
第55行是更新数据库的操作:
sql = "update userinfo set 登录次数='"& number &"', 上次登录时间='"& thistime &"' where 用户帐号="
sql= sql & sqlstr(loguserid)
Application.lock
conn.Execute sql
Application.unlock
我想知道为什么在我的笔记本上原封不动的拷下来的程序怎么换个机子就错了。
同样还有个数据库插入操作也是同样的结果:
sql = "insert into userinfo values("
sql = sql & sqlstr(userid) & ","
sql = sql & sqlstr(truename) & ","
sql = sql & sqlstr(work) & ","
sql = sql & sqlstr(duty) & ","
sql = sql & sqlstr(worktel) & ","
sql = sql & sqlstr(mobile) & ","
sql = sql & sqlstr(email) & ","
sql = sql & sqlstr(password) & ","
sql = sql & sqlstr(other) & ","
sql = sql & sqlstr(regtime) & "," & "'"&number&"','"& regtime &"','"&downp&"','"&upp&"')"
Application.lock
conn.Execute sql
Application.unlock
网站马上就要使用,紧急求救阿!