Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 30
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts

    what error is this??

    can someone tell me what kind of error is this???????and how to get rid of it?i am goind nuts already!!!arrgghh!!!

    Code:
    Error Type:
    ADODB.Recordset (0x800A0CB3)
    Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype
    Warm Regards,
    Mivec

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    google it, or show us the code that produces this error. Otherwise we cannot help you
    I am the luckiest man in the world

  • #3
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hrm......i dunno whats wrong with it either....but i have another error

    Error Type:
    ADODB.Recordset (0x800A0CB3)
    Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype.
    /eventDone.asp, line 13
    my code in the upload page:

    Code:
    <%@ LANGUAGE="VBSCRIPT" %>
    <!-- #include file = "adovbs.inc" -->
    <!-- including the function definition file -->
    <!-- #include file = "FuncDef.asp" -->
    <!-- This file is to update the database after the confirmation -->
    
    <%
    Dim SQLtxt
    SQLtxt = "SELECT * from tEvents"
    
    OpenMyDB dbfile, SQLtxt
    
    DBRecordset.AddNew
    DBRecordset("evTitle") = request.form("txtEvName")
    DBRecordset("evVenue") = request.form("txtEvLocation")
    DBRecordset("evSpeaker") = request.form("txtEvHandler")
    DBRecordset("evDate") = request.form("txtEvDate")
    DBRecordset("evSynopsis") = request.form("txtaSysnopsis")
    DBRecordset("evSignUp") = request.form("txtSign")
    DBRecordset("evWebLink") = request.form("txtWeblink")
    DBRecordset("evBorderColor") = request.form("txtCol")
    DBRecordset.Update
    
    CloseMyDB
    %>
    my code in the FuncDef.asp

    Code:
    <%
    Dim DBConnection
    Dim DBRecordset
    Dim dbfile
    Dim usrnm, passw
    
    dbfile = Server.MapPath(".")&"\iee.mdb"
    
    
    Sub OpenMyDB(dbfile, SQLText)
    	set DBConnection = Server.CreateObject("ADODB.Connection")
    	set DBRecordset = Server.CreateObject("ADODB.Recordset")
    	
    
    	DBConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dbfile&";Persist Security Info=False"
    	DBConnection.open 
    	DBRecordset.open SQLText, DBConnection, adOpenDynamic '(this line works the same as below)
    	'Set DBRecordset = DBConnection.execute (SQLText, 1)
    End sub
    
    
    Sub CloseMyDB()
    	DBConnection.close
    	Set DBConnection = Nothing
    End sub
    
    
    %>
    line 13 is at this part "DBRecordset.AddNew"......i don't know what the hell is wrong.....it looks fine to me...
    Warm Regards,
    Mivec

  • #4
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lisbon, CT
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You need to add a lock type to your recordset open statement. Also you should close your recordsets before closing your db connection.

    BaldEagle

  • #5
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by BaldEagle
    You need to add a lock type to your recordset open statement. Also you should close your recordsets before closing your db connection.

    BaldEagle
    errr...i dun get u.....sorry...noob in asp here....
    Warm Regards,
    Mivec

  • #6
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lisbon, CT
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Read this:

    http://msdn.microsoft.com/library/de...rolocktype.asp

    You may want to pass another variable to your OpenMyDb function/sub, that being the locktype and ultimately you could add a fourth as the cursortype. Then the function would be a little more universal. Maybe you should google recordsets and see what kind of info there is available. As for closing your recordset just use this syntax:

    rs.Close
    Set rs = Nothing

    You should also set your connection to Nothing when you are done with it.

    Good luck,

    BaldEagle
    Last edited by BaldEagle; 08-11-2005 at 09:42 PM.

  • #7
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lisbon, CT
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I should have given you this link to begin with.

    http://www.w3schools.com/ado/prop_rs_locktype.asp

    BaldEagle

  • #8
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by BaldEagle
    Read this:

    http://msdn.microsoft.com/library/de...rolocktype.asp

    You may want to pass another variable to your OpenMyDb function/sub, that being the locktype and ultimately you could add a fourth as the cursortype. Then the function would be a little more universal. Maybe you should google recordsets and see what kind of info there is available. As for closing your recordset just use this syntax:

    rs.Close
    Set rs = Nothing

    You should also set your connection to Nothing when you are done with it.

    Good luck,

    BaldEagle
    thanks for the reply but i think i hv done that part and still just cant get hold of my statements...if u check on the funcdef.asp file, i alwiz close it and u can see that it's defined there already....i still don't know whats wrong
    Warm Regards,
    Mivec

  • #9
    Regular Coder
    Join Date
    Apr 2005
    Location
    Lisbon, CT
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mivec
    thanks for the reply but i think i hv done that part and still just cant get hold of my statements...if u check on the funcdef.asp file, i alwiz close it and u can see that it's defined there already....i still don't know whats wrong
    Code:
    <%
    Dim DBConnection
    Dim DBRecordset
    Dim dbfile
    Dim usrnm, passw
    
    dbfile = Server.MapPath(".")&"\iee.mdb"
    
    
    Sub OpenMyDB(dbfile, SQLText)
    	set DBConnection = Server.CreateObject("ADODB.Connection")
    	set DBRecordset = Server.CreateObject("ADODB.Recordset")
    	
    
    	DBConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dbfile&";Persist Security Info=False"
    	DBConnection.open 
    	DBRecordset.open SQLText, DBConnection, adOpenDynamic  '(this line works the same as below)
    	'Set DBRecordset = DBConnection.execute (SQLText, 1)
    End sub
    
    
    Sub CloseMyDB()
    	DBConnection.close
    	Set DBConnection = Nothing
    End sub
    %>
    The statement in red needs another variable which is the locktype.

    DBRecordset.open SQLText, DBConnection, adOpenDynamic, adLockOptimistic


    I see no recordset closing.

    BaldEagle

  • #10
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by BaldEagle
    Code:
    <%
    Dim DBConnection
    Dim DBRecordset
    Dim dbfile
    Dim usrnm, passw
    
    dbfile = Server.MapPath(".")&"\iee.mdb"
    
    
    Sub OpenMyDB(dbfile, SQLText)
    	set DBConnection = Server.CreateObject("ADODB.Connection")
    	set DBRecordset = Server.CreateObject("ADODB.Recordset")
    	
    
    	DBConnection.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&dbfile&";Persist Security Info=False"
    	DBConnection.open 
    	DBRecordset.open SQLText, DBConnection, adOpenDynamic  '(this line works the same as below)
    	'Set DBRecordset = DBConnection.execute (SQLText, 1)
    End sub
    
    
    Sub CloseMyDB()
    	DBConnection.close
    	Set DBConnection = Nothing
    End sub
    %>
    The statement in red needs another variable which is the locktype.

    DBRecordset.open SQLText, DBConnection, adOpenDynamic, adLockOptimistic


    I see no recordset closing.

    BaldEagle
    err......i tot i have a recordset closing?if not, then where do i do it/put it?
    Warm Regards,
    Mivec

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts

    Post

    Quote Originally Posted by mivec
    err......i tot i have a recordset closing?if not, then where do i do it/put it?
    In your CloseDb sub:
    Code:
    Sub CloseMyDB()
    	DBRecordset.close
    	Set DBRecordset = Nothing
    	DBConnection.close
    	Set DBConnection = Nothing
    End sub
    I am the luckiest man in the world

  • #12
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In your CloseDb sub:

    Code:

    Sub CloseMyDB()
    DBRecordset.close
    Set DBRecordset = Nothing
    DBConnection.close
    Set DBConnection = Nothing
    End sub
    ok i hv done all the changes in the code where i hv already added adLockOptimistic and also the changes done to my CloseMyDb function...but it sill doesn't work and i am getting this error:

    Error Type:
    Microsoft JET Database Engine (0x80040E09)
    Cannot update. Database or object is read-only
    i checked it...it's not an read only db...it's an archive...so what da hell is wrong now???

    cheers
    Warm Regards,
    Mivec

  • #13
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,072
    Thanks
    4
    Thanked 8 Times in 8 Posts
    is the database located in a directory with read/write permissions?

    Also have you thought of just inserting the record using a SQL INSERT statement instead of using ADO?

  • #14
    New Coder
    Join Date
    Aug 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello,

    the solution is simple:

    just add write-access for the user IUSR_COMPUTERNAME for the access database-file (.mdb).

    cheers

  • #15
    Regular Coder
    Join Date
    Feb 2004
    Location
    Malaysia
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Cyberlord
    Hello,

    the solution is simple:

    just add write-access for the user IUSR_COMPUTERNAME for the access database-file (.mdb).

    cheers
    err....i dunno how i can do that.....can u guide me??? i read from another forum and tried to uncheck the "read-only" checkbox...but whenever i hv updated it and click ok and i return to it's properties, it's still checked as read-only...whats the problem??
    Warm Regards,
    Mivec


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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