Error# 3704: The operation requested by the applic

Results 1 to 9 of 9

Thread: Error# 3704: The operation requested by the applic

  1. #1
    Join Date
    Dec 1969
    Posts
    540

    Default Error# 3704: The operation requested by the applic

    Error# 3704: The operation requested by the application is not alowed if the object is closed.<BR><BR>This error appears when running a very simple script that attempts to use the Update method of the Recordset Object. I get similar results when trying to use the AddNew method.<BR><BR>I have no problem reading a database, only trying to update or add new records.<BR><BR>The DB is Access. DSN=admin, tablename = testtable, fieldname = sample.<BR><BR>Code Below<BR>-------<BR>&#060;%Option Explicit%&#062;<BR>&#060;!--#include file="adovbs.inc"--&#062;<BR>&#060;HTML&#062;<BR>&#060;BODY&#062;<BR> &#060;h3&#062;This Page Loaded On &#060;% = WeekdayName(Weekday(Date)) %&#062;, &#060;% = Date %&#062;.<BR>At &#060;% = Time %&#062;.<BR>&#060;/h3&#062;<BR><BR>&#060;%<BR>Dim objcon, rs<BR>On Error Resume Next<BR><BR>Set objcon = Server.CreateObject("ADODB.Connection")<BR>Set rs = Server.CreateObject("ADODB.Recordset")<BR>objcon.o pen "dsn=admin"<BR><BR>rs.open "select * from testtable" , objcon , ,adlockoptimistic<BR><BR> if Rs.Supports(Update) then<BR> rs("sample").value = "xyz"<BR> rs.update<BR> else<BR> Response.write "Can&#039t add records"<BR> end if<BR>&#039cleanup<BR><BR>rs.close<BR>Set rs = nothing<BR>objcon.Close<BR>Set objcon = nothing<BR><BR><BR>&#039check for errors<BR><BR> If Err.Number = 0 Then %&#062;<BR> &#060;font size=5&#062;&#060;i&#062;There were no errors&#060;/i&#062;&#060;/font&#062;&#060;p&#062;<BR> <BR> &#060;% Else %&#062;<BR> There was an error during execution&#060;p&#062;<BR> Error #&#060;%=Err.Number%&#062;: &#060;%=Err.Description%&#062;&#060;p&#062;<BR> &#060;% End If %&#062;<BR><BR><BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR><BR><BR>

  2. #2
    Sathiya Guest

    Default RE: Error# 3704: The operation requested by the ap

    I dont know this may help u or not <BR><BR>Check whether you have write access over the table

  3. #3
    Join Date
    Dec 1969
    Posts
    540

    Default RE: Error# 3704: The operation requested by the ap

    This doesn&#039t help. I have set the NT permissions to write and no change was made.<BR><BR>The current error is <BR><BR>Error# 3219: The operation requested by the application is not alowed in this context.<BR>

  4. #4
    Nathen Grass Guest

    Default RE: Error# 3704: The operation requested by the ap

    Which line in the code is generating the error?


  5. #5
    Join Date
    Dec 1969
    Posts
    540

    Default Can't update. Database or object is read-only.

    Since then, I have moved on to new errors.<BR><BR>I have changed the code slightly as shown below.<BR><BR>I used a "testing" print statement to see how far the code was getting. At the present time the offending line is<BR><BR>rs.update<BR><BR>The current error is <BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access 97 Driver] Can&#039t update. Database or object is read-only. <BR><BR>I may be getting close. I have set the NT permissions and IIS permissions for the database file to allow write permissions. This doesn&#039t seem to help. Is there a permission for the table I need to set in Access in order to update?<BR><BR>Code Below<BR>_______<BR>&#060;%Option Explicit%&#062;<BR>&#060;!--#include file="adovbs.inc"--&#062;<BR>&#060;HTML&#062;<BR>&#060;BODY&#062;<BR> &#060;h3&#062;This Page Loaded On &#060;% = WeekdayName(Weekday(Date)) %&#062;, &#060;% = Date %&#062;.<BR>At &#060;% = Time %&#062;.<BR>&#060;/h3&#062;<BR><BR>&#060;%<BR>Dim objcon, rs<BR>&#039On Error Resume Next<BR><BR><BR>Set objcon = Server.CreateObject("ADODB.Connection")<BR>Set rs = Server.CreateObject("ADODB.Recordset")<BR>objcon.o pen "dsn=admin"<BR><BR><BR>rs.CursorType = adOpenKeyset<BR><BR>rs.LockType = adLockOptimistic<BR><BR>rs.open "select * from testtable" ,objcon<BR><BR><BR> &#039if Rs.Supports(Update) then<BR><BR> rs("simple").value = "xyz"<BR>%&#062;<BR>&#060;%="testing"%&#062;<BR>&# 060;%<BR><BR> rs.update<BR><BR> &#039else<BR> &#039 Response.write "Can&#039t add records"<BR> &#039end if<BR><BR><BR>&#039cleanup<BR>rs.close<BR>Set rs = nothing<BR><BR>objcon.Close<BR>Set objcon = nothing<BR><BR> If Err.Number = 0 Then %&#062;<BR> &#060;font size=5&#062;&#060;i&#062;There were no errors&#060;/i&#062;&#060;/font&#062;&#060;p&#062;<BR> <BR> &#060;% Else %&#062;<BR> There was an error during execution&#060;p&#062;<BR> Error #&#060;%=Err.Number%&#062;: &#060;%=Err.Description%&#062;&#060;p&#062;<BR> &#060;% End If %&#062;<BR><BR><BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR>

  6. #6
    Sathiya Guest

    Default RE: Can't update. Database or object is read-o

    Check the table permissions

  7. #7
    Join Date
    Dec 1969
    Posts
    540

    Default Table permissions

    I have tried, but I am not that familiar with access. Using the security tools within access there is only 1 user, admin.<BR><BR>Looking at the tool that describes the security for the table in question, everything appears to be wide open for read and write.<BR><BR>Only Open/Run permissions are denied.<BR><BR>Do you know if there is something explicitly I need to do?<BR><BR>Bill

  8. #8
    Edward Tanguay Guest

    Default Office 2000 clobbered ODBC

    I just installed Office 2000, suddenly my ODBC connections didn&#039t work, I installed MDAC 2.1 which fixed some errors, but now I have the same update error mentioned in this thread: It says that my database or object is write-protected. I have given all permissions at the NT-Explorer level. What else can I try so that the ODBC works? <BR>Thanks,<BR>Edward

  9. #9
    Join Date
    Dec 1969
    Posts
    540

    Default read only database object???

    I wish I knew. I&#039m not using 2000, but my database or object is read only. I suspected that the permissions in IIS directory security was somehow causing a problem, but that didn&#039t seem to help either.<BR><BR>If you find out anything, could you send me an email?<BR>a35212f@msumusik.mursuky.edu<BR><BR>Than ks

Posting Permissions

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