Re: Error 3265 mystery error
- From: "will f" <null@xxxxxxxxxx>
- Date: Mon, 26 Jun 2006 11:33:49 -0400
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.1. What version of ADO (MDAC) are you using?
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.
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.
.
- Follow-Ups:
- Re: Error 3265 mystery error
- From: Stephen Howe
- Re: Error 3265 mystery error
- From: Bob Barrows [MVP]
- Re: Error 3265 mystery error
- References:
- Error 3265 mystery error
- From: will f
- Re: Error 3265 mystery error
- From: Bob Barrows [MVP]
- Error 3265 mystery error
- Prev by Date: Re: Error 3265 mystery error
- Next by Date: Re: Error 3265 mystery error
- Previous by thread: Re: Error 3265 mystery error
- Next by thread: Re: Error 3265 mystery error
- Index(es):
Relevant Pages
|
|