我用 asp 程式寫入新紀錄入資料庫, 但出現錯誤 :
VBScript 發生錯誤: 錯誤號碼:3251 錯誤說明:目前的資料錄集不支援更新。這可能成為提供者或所選鎖定類型的限制。 錯誤輔助說明:1240648 錯誤來源:Microsoft VBScript 執行階段錯誤
Why ??? 點處理....
Asp 程式如下
-----------------------------------------------------------------------------------------------
<%On Error Resume Next 'Dim strDBDSN, strSQL, objDBConn
strDBDSN = "Driver={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("db/ppdb.mdb")&";"
Set objDBConn = Server.CreateObject("ADODB.Connection")
objDBConn.Open strDBDSNDim strLoginID,strPassword,strEmailif request.form("loginID")<>"" thenstrLoginID = Request.Form("loginID")
strPassword = Request.Form("password")
strEmail = Request.Form("email")Set objRS = Server.CreateObject("ADODB.RecordSet")
sql = "select * from member"
objRS.Open sql,objDBConnobjRS.AddNew
objRS.Fields("loginID") = strLoginID
objRS.Fields("Password") = strPassword
objRS.Fields("email") = strEmail
objRS.Update
...........
%><%On Error Resume Next 'Dim strDBDSN, strSQL, objDBConn
strDBDSN = "Driver={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("db/ppdb.mdb")&";"
Set objDBConn = Server.CreateObject("ADODB.Connection")
objDBConn.Open strDBDSNDim strLoginID,strPassword,strEmail
if request.form("loginID")<>"" thenstrLoginID = Request.Form("loginID")
strPassword = Request.Form("password")
strEmail = Request.Form("email")Set objRS = Server.CreateObject("ADODB.RecordSet")
sql = "select * from member"
objRS.Open sql,objDBConn
objRS.AddNew
objRS.Fields("loginID") = strLoginID
objRS.Fields("Password") = strPassword
objRS.Fields("email") = strEmail
objRS.Update