<% on error resume next Server.ScriptTimeOut=1000 const adOpenKeyset = 1 const adLockReadOnly = 1 const adLockPessimistic = 2 const adLockOptimistic = 3 Ip = Request.ServerVariables("REMOTE_ADDR") '客户端IP Sever_Name = Request.ServerVariables("SERVER_NAME") '服务器地址 dim conn dim sq_connstr ' connstr="DBQ="+server.mappath("kjb.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};" sq_connstr="driver={SQL Server};server=210.51.191.2;uid=renmeang;pwd=rdadfd*&ghg87;database=RenMing" set conn=server.createobject("ADODB.CONNECTION") if err then err.clear else conn.open sq_connstr if err then err.clear end if end if sub GetErrors(bug) set myErrors=Conn.Errors if MyErrors.Count>0 then response.write "对不起,系统运行错误!

错误类型:"+bug+"


请把此页面保存并发送给本站管理员tt@tt91.com,以协助我们查找错误原因,感谢您的支持

" 'for i=0 to myErrors.Count-1 ' response.write "错误"+cstr(i)+":"+myErrors(i).Description+"

" 'next end if set MyErrors = nothing End Sub '-------------------------------------------------------------------- Sub GetData(ssql) '查询数据 on error resume next Set rs = Server.CreateObject("ADODB.RecordSet") rs.ActiveConnection = conn rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Open ssql 'bug="数据查询错误,GetData()" 'GetErrors(bug) End Sub '-------------------------------------------------------------------- Sub DealData(ssql) '处理数据 on error resume next Const adCmdText=1 Const RecordsAffected=1 CommandText=ssql Conn.Execute CommandText,RecordsAffected,adCmdText bug="数据添加、修改或删除错误,DealData("+ssql+")" 'bug="数据添加、修改或删除错误,DealData()" GetErrors(bug) End Sub '-------------------------------------------------------------------- Function GetDataNum(ssql) '查询记录数 on error resume next Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open ssql,conn,1,1 'bug="查询记录数错误,GetDataNum()" 'GetErrors(bug) GetDataNum=rs.RecordCount rs.close set rs = nothing End Function '-------------------------------------------------------------------- %> 浜烘皯浣撹偛鍑虹増绀,浜烘皯浣撹偛鍑虹増绀剧綉绔欙紝缃戜笂鍥句功锛屼綋鑲叉暀绋嬶紝鐗逛环涔︼紝涔︾睄锛屼汉姘戜綋鑲插嚭鐗堢ぞ瀹樻柟缃戠珯
  璁句负棣栭〉 | 鍔犲叆鏀惰棌 | 鍏充簬鏈珯  
 

璐功鎶曠ǹ鐢佃瘽锛010- 67118491  鎵嬫満鍙/寰俊鍙凤細13520949302  閭锛657403686@qq.com
鍦板潃锛氬寳浜競涓滃煄鍖轰綋鑲查璺8鍙 浜烘皯浣撹偛鍑虹増绀 閭紪锛100061     浜琁CP澶12009246    澶氬獟浣撳浘涔 鍏紬鍙峰钩鍙