HELP with adding records!

Results 1 to 2 of 2

Thread: HELP with adding records!

  1. #1
    Join Date
    Dec 1969

    Default HELP with adding records!

    Hi, I&#039;ve been having alot of problems with adding to a database. I&#039;ve tried almost every sample off 4guys. If someone could help me that would help me out a lot! here is the code i&#039;m using, or trying to use. <BR><BR>&#060;%@ LANGUAGE=VBSCRIPT %&#062;<BR>&#060;%<BR><BR>&#039; Constants, et al.<BR>&#039;<BR>&#039; Important values from ""<BR>&#039;<BR>&#039; CursorTypeEnum<BR>Const adOpenForwardOnly = 0<BR>Const adOpenKeyset = 1<BR>Const adOpenDynamic = 2<BR>Const adOpenStatic = 3<BR>&#039; LockTypeEnum<BR>Const adLockReadOnly = 1<BR>Const adLockPessimistic = 2<BR>Const adLockOptimistic = 3<BR>&#039; CommandTypeEnum<BR>Const adCmdText = 1<BR>Const adCmdTable = 2<BR>&#039;<BR>&#039; Names for cursor and lock types:<BR>&#039;<BR><BR>Set Conn = Server.CreateObject("ADODB.Connection")<BR>Conn.Op en "DRIVER=Microsoft Access Driver (*.mdb);" _<BR> & "DBQ=" & Server.MapPath("/fpdb/support.mdb")<BR><BR>Set RS = Server.CreateObject("ADODB.RecordSet")<BR><BR> RS.Open "support", Conn, adOpenKeySet, adLockOptimistic, adCmdTable<BR> RS.AddNew<BR> RS("Name") = Request.Form("Name")<BR> RS("Email") = Request.Form("Email")<BR> RS("Login") = Request.Form("Login")<BR> RS("Password") = Request.Form("Password")<BR> RS("IP") = Request.Form("IP")<BR> RS("Time") = Request.Form("Time")<BR> RS("Date") = Request.Form("Date")<BR> RS("Problem") = Request.Form("Problem")<BR> RS("Description") = Request.Form("Description")<BR> RS.Update<BR> idOfAddedRecord = RS("ID") <BR><BR>conn.Close<BR>response.redirect("default.h tm")<BR>%&#062;<BR><BR>Here is the error i&#039;m getting<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only. <BR><BR>/support/add.asp, line 41

  2. #2
    Join Date
    Dec 1969

    Default RE: HELP with adding records!

    Your message suggests that the Access database file attributes are set as read only, or that your network permissions are restricted to read-only.<BR>HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts