Re: Closing recordset generates exception
- From: "Stephen Howe" <stephenPOINThoweATtns-globalPOINTcom>
- Date: Wed, 22 Aug 2007 12:52:23 +0100
When the update fails I get a descriptive message but I an other error
"operation not allowed in this context" is thrown up when the
rs.Close() is issued. Any idea why is this happening?
Your RecordSet Open is deficient.
The RecordSet will be being open in ReadOnly mode as that is the default
LockType.
Naturally that will prevent an Update().
For this:
rs.Open("AANWREG", Conn)
is ADO supposed to guess that "AANWREG" is a table?
Why arent you specifying CursorLocation, LockType, CursorType and additional
arguments telling ADO what "AANWREG" is?
Open() is the most important call of a Recordset, it affects various
properties, behaviour of methods, it is crazy to allow default arguments. It
also affects performance.
Cheers
Stephen Howe
.
- Follow-Ups:
- Re: Closing recordset generates exception
- From: Hans van de Laar
- Re: Closing recordset generates exception
- References:
- Closing recordset generates exception
- From: Hans van de Laar
- Closing recordset generates exception
- Prev by Date: Closing recordset generates exception
- Next by Date: Re: Closing recordset generates exception
- Previous by thread: Closing recordset generates exception
- Next by thread: Re: Closing recordset generates exception
- Index(es):