Re: Error 3265 mystery error



will f wrote:
Greetings.

I'm getting an error 3265 (Item-not-found-in-the-collection type
error) when I attempt to open a recordset in an Access 2000 database
using adCmdTable. My code looks something like this:
Call MyRecordset.Open("tblTest", myConnection, adOpenKeyset,
adLockOptimistic, adCmdTable)

The myConnection variable is an open ADODB connection object.
"tblTest" is an existing table in the database. As a matter of fact,
in the debug window I can use ADOX to confirm that there is a table
named "tblTest" in the database. With ADOX, I can confirm that the
table is there, and even iterate through the table's columns
collection, etc.

Why would ADO give me an error 3265 when I try to open a recordset of
the table, event when ADOX can confirm that it is there? Are there
any known bugs with regard to this? Is there another error that's not
getting caught by MS that's causing 3265 as a side-effect? Sometimes
improperly handled errors can give rise to subsequent errors that are
misleading.

Please help. Thank you.

1. What version of ADO (MDAC) are you using?
2. Are you sure you need adCmdTable? Can you explain what you are
gaining by not using a sql SELECT statement with a WHERE clause to limit
the records returned to open the table? Just as a test, try this to see
if you still get the error:

Call MyRecordset.Open("select * from tblTest", myConnection, _
adOpenKeyset, adLockOptimistic, adCmdText)

3. How have you verified that this is the line causing the error?
4. Have you properly instantiated the recordset object?

Bob Barrows




--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Connection types and speeds
    ... The memory used by holding the connection open is not ... All recordset inserts seen to consequently have 0ms execution time, ... actually written to the database while the code has regained control ... RecordsetClone of a form) when a transaction was rolled back, ...
    (microsoft.public.access.queries)
  • Re: Validate logins with ASP, MS Access and Cookies error
    ... return another column from the database that stores the users 1st name :-) ... 'create connection and recordset objects ... Set cnStr = Server.CreateObject ... ' validate variables against database ...
    (microsoft.public.inetserver.asp.db)
  • Re: Recordset problem
    ... This is why I'm trying to use Recordset. ... Dim strPrice As String ... >> Dim dbs As Database ... >You don't need to open the database object dbs before ...
    (microsoft.public.access.modulesdaovba)
  • Re: Validate logins with ASP, MS Access and Cookies error
    ... return another column from the database that stores the users 1st name ... 'create connection and recordset objects ... Set cnStr = Server.CreateObject ... ' validate variables against database ...
    (microsoft.public.inetserver.asp.db)
  • Re: Validate logins with ASP, MS Access and Cookies error
    ... return another column from the database that stores the users 1st name ... 'create connection and recordset objects ... Set cnStr = Server.CreateObject ... ' validate variables against database ...
    (microsoft.public.inetserver.asp.db)