说一个奇怪得现象,昨天我按斑竹得修改建议修改了以后还是一样报错,但我在记录集指针前面加上一条 on error resume next语句候就奇迹般得没问题了,为什么会这样?修改后得代码是 <% Set lc_conn = Server.CreateObject("ADODB.Connection") Provider = "Provider = Microsoft.Jet.OLEDB.4.0;" DBPath = "Data Source = " & Server.MapPath("hf.mdb") lc_conn.Open Provider & DBPath Set lrs_rs = Server.CreateObject("ADODB.Recordset") on error resume next lrs_rs.Open "[user]", lc_conn, cursor,2 Dim ls_uid if lrs_rs Is Nothing then Resphonse.Write "打开数据库失败!" Resphonse.End else lrs_rs.MoveFirst ls_uid = lrs_rs("ID") end if %>
我就是程序,程序就是我