SQL error

Results 1 to 3 of 3

Thread: SQL error

  1. #1
    Someone Guest

    Default SQL error

    Hi,<BR>Can somebody tell me where I have done wrong here.<BR><BR>When I am adding a record with Add.New method, the error I am getting is:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.<BR><BR>I have checked my database, it is &#039;not read only&#039; and I am opening recordset as 3 and 3. So I thought that should work.<BR><BR> objRs.Open "test", objConn, 3, 3<BR> <BR> objRs.AddNew<BR> objRs("item_name")= Request.Form("item") &#039;string<BR> objRs("summary")= Request.Form("summary") &#039;string<BR> objRs("class_id")=Request.Form("size") &#039;Integer<BR> objRs("level_id")=Request.Form ("student_level") &#039;Integer<BR> objRs("full_description")= Request.Form("description")<BR> objRs("references")= Request.Form("references")&#039; string<BR> objRs.Update<BR><BR>If I am inserting with SQL Insert statement, I am getting ADODB.Recordset (0x800A0BB9)<BR>Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<BR> <BR>Where as I have checked all my string values and integer values.<BR>I don&#039;t know what to do??<BR>here is my SQL code:<BR>strSQL="INSERT INTO test(item_name, summary, class_id, level_id, full_description, references)" &_<BR> strSQL= strSQL & " VALUES(&#039;"& item & "&#039;,&#039;" & summary & "&#039;, " & size & "," & student_level & ",&#039;" & description & "&#039;,&#039;" & references & "&#039;)"<BR><BR>objRs.Open strSQL, objConn, 3, 3<BR>Please somebody help me???<BR>THANKS IN ADVANCE:)

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL error

    The Permissions on the server is set only to READ. You need READ and WRITE Access.<BR><BR>Typically the Account used on an NT server is the IUSR or Internet User account. Set that to READ WRITE on that file, or set the entire folder to that. My recommendation is just the file.

  3. #3
    Someone Guest

    Default RE: SQL error

    Thanks for your response. I checked with the Administrator and the server has a read and write permission.<BR>Do you have any other idea?<BR><BR>Thanks.

Posting Permissions

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