Re: Error 3265 mystery error



What environment is this? VB? ASP? vbscript?

So, "tblTest" is the only one that gives you a problem?
Have you dynamically created tblTest (you mentioning of ADOX in your OP
makes this a possibility)? Can you see it in the database window when
you open your database in Access? Are you aware of the Jet delayed-write
behavior? http://support.microsoft.com/default.aspx/kb/200300

Have you used any reserved keywords for your field names
(http://www.aspfaq.com/show.asp?id=2080)?

will f wrote:
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.

--
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
    ... 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: Error 3265 mystery error
    ... I tried using "SELECT * FROM tblTest" using the adCmdText param. ... FROM NoSuchTable," I get the following: "The Microsoft Jet database engine ... some other table in the database, it opens fine. ...
    (microsoft.public.data.ado)
  • Re: problem with number and char formatting..
    ... Where 'TestText' is your field name and 'tblTest' is your table name. ... imported "OLEPath" field values in my database and filter out or ... Is there a way to do this with SQL Select statement or VBA(if ...
    (microsoft.public.access.forms)