To update a database

Results 1 to 3 of 3

Thread: To update a database

  1. #1
    Krishna Guest

    Default To update a database

    Hai, <BR>I am trying to update a field in a table. The SQL statement that I have given belowreturns only one record. As you could see, I have set the mode as readwrite mode and also the DSN is not set to Read-only. But still, I get an error saying "Cannot update. Database or object is read-only". What else Should I change? <BR>Code is: <BR>set conn=server.createobject("adodb.connection") <BR>conn.Mode = adModeReadWrite <BR>myDSN="DSN=K12.dsn;uid=;pwd=" <BR> myDSN <BR>SQL="SELECT * from Comments WHERE Topic=&#039;1&#039; AND Sub=&#039;1&#039;" <BR>Set RS = Server.CreateObject("ADODB.RecordSet") <BR>RS.Open SQL, conn, 3, 3, 1 <BR>rec=RS.RecordCount <BR>Response.Write " count is " & rec <BR>RS("EMail")="" <BR>RS.Update <BR><BR>Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default See Post below "Try This" 6 posts down


  3. #3
    Krishna Guest

    Default RE: See Post below

    Thanks a Ton, Jeremy.....It worked.

Posting Permissions

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