Newbie record update question

Results 1 to 4 of 4

Thread: Newbie record update question

  1. #1
    David Freer Guest

    Default Newbie record update question

    I can successfully perform a query and extract field data from a record, but I don&#039t seem to be able to update the field as follows:<BR><BR>set conn = server.createobject("ADODB.Connection")<BR>dbStrCo nnect = "Provider=Microsoft.Jet.OLEDB.4.0; " & "Data Source=" & GetVirtualPath( "appsUpgrades.mdb" ) & _<BR> "; User Id=admin; Password=;"<BR><BR> dbStrConnect<BR>SQL="SELECT * FROM Upgrade WHERE RegID=&#039" & strID & "&#039"<BR>set rstUpgrades = conn.execute(SQL)<BR> <BR>if rstUpgrades.bof then<BR> Response.Write "Fail"<BR>else<BR> iCnt = rstUpgrades("NumberOfUpgrades") + 1<BR><BR>&#039 either of the following lines causes the browser to bark:<BR>&#039ADODB.Field error &#039 800a0cb3&#039<BR>&#039The operation requested by the application is not supported <BR>&#039by the provider<BR><BR> &#039rstUpgrades("NumberOfUpgrades") = iCnt<BR> &#039rstUpgrades.Update<BR><BR>Need some newbie help please<BR>

  2. #2
    John Weeflaar Guest

    Default RE: Newbie record update question

    From what I saw, 3 things you may need to look at:<BR>1) I&#039m not sure if you need to write user id=... or user=...<BR>or either way will work in dbStrConnect.<BR><BR>2) You forgot to add "end if" after <BR> iCnt = rstUpgrades("NumberOfUpgrades") + 1<BR><BR>3) Again I&#039m not sure what data type for RegID field of<BR> your Upgrade table. If it is of type number,<BR> you need to write:<BR> SQL="SELECT * FROM Upgrade WHERE RegID=" & strID <BR> <BR>John

  3. #3
    David Freer Guest

    Default Not a solution

    Thanks for your response, but I don&#039t believe this is the solution.<BR><BR>1) The choice of using "user id" came straight from this same message board. Since I can connect and retrieve ANY of the fields returned by my SQL statement, I don&#039t see how this has anything to do with being able to update any of the same fields.<BR><BR>2) For the sake of brevity, I stopped showing code AFTER the offending statement(s). There is a "end if".<BR><BR>3) Since the query works, I&#039m not sure what your suggestion has to do with updating a field that I can already retrieve.<BR><BR>Thanks anyway

  4. #4
    John Weeflaar Guest

    Default RE: Newbie record update question

    I apologize for offending you.<BR>But I believe this forum is for everyone to ask questions,<BR>show their code, and someone else informs them tho possible<BR>errors/problems in their code. This is not to embarrass anyone.<BR><BR>John

Posting Permissions

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