Re: Error 3265 mystery error



Hi Bob.

Thanks for your response.

I tried using "SELECT * FROM tblTest" using the adCmdText param. I get the
same error.

Here's something else that's wonky. When I try to open a table that I know
does not exist, I get a different error. When I try something like "SELECT *
FROM NoSuchTable," I get the following: "The Microsoft Jet database engine
cannot find the input table or query 'NoSuchTable'. Make sure it exists and
that its name is spelled correctly."

So that 3265 seems to be behaving as if I am referencing a field that does
not exist in the table. But, as you can see, I am not specifically
referrencing any fields at all.

As far as the recordset being properly initiated, when I change "tblTest" to
some other table in the database, it opens fine.

Also, I have run a database compact/repair on the database before doing the
whole operation, so I don't think the db is corrupted - but I could be
wrong.

Any ideas?

Thank you.

- will f

"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:eDtjAqSmGHA.3600@xxxxxxxxxxxxxxxxxxxxxxx
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: Error 3265 mystery error
    ... Have you dynamically created tblTest (you mentioning of ADOX in your OP ... you open your database in Access? ... "tblTest" to some other table in the database, it opens fine. ...
    (microsoft.public.data.ado)
  • Re: Error 3265 mystery error
    ... I'm not using ADOX in the app. ... I did check the database window in MS Access, ... Have you dynamically created tblTest (you mentioning of ADOX in your OP ... "tblTest" to some other table in the database, it opens fine. ...
    (microsoft.public.data.ado)
  • Re: Tracking Log In and Log Out times of Users
    ... The fact that the database is on the server should be irrelevant. ... Type mismatch and then highlights Set rst = ... On my startup form, (that opens every time the database is open, ... I then went to the load ...
    (microsoft.public.access.modulesdaovba)
  • RE: Compacting MDB help
    ... The autoexec macro opens a ... The FrontEnd.mdb's main switchboard has a cbo to switch back end ... FECompact.mdb runs the few lines of code to compact the FrontEnd.mdb ... I'm quite certain that you can't Compact an open database from within itself ...
    (microsoft.public.access.modulesdaovba)
  • Re: Code causes error 2486 in access 2000, IPF in 2002
    ... Compact the database to get rid of this junk: ... Allen Browne - Microsoft MVP. ... Windows 98 machine. ... update queries and opens another form - ...
    (microsoft.public.access.formscoding)