Yeah, that was imprecisely stated. Single table updates don't require a
primary key. In joined table recordsets, I have had instances where I
needed to add a primary key to one table and include that column in the SQL
command text to get the recordset to write back to the table via the
UpdateBatch method. This is usually using the Jet OLEDB 4.0 with a static,
client-side, batch optimistic mode cursor. I still have to read the manual
frequently .
--
John Goodfellow
irtfnm
use john at goodfellowassoc dot com
"Lennart Nielsen" wrote in message
news:4952541@discussion.autodesk.com...
Sorry to disagree, John, but you do not need a primary key field in the
table to make it upgradeable.
But you are correct, that sdanis just needs to check recordset.State to see
if the recordset is open and you can do the same for the connection, if a
separate connection has been made.
Lennart
"John Goodfellow" wrote in message
news:4951479@discussion.autodesk.com...
Also notice some other properties that are useful for checking ADO objects.
The recordset also has a State property. The connection has an errors
collection containing information specific to ADO errors. Some errors will
also show up in the VBA Err object. The recordset has a Supports property,
which can tell you if the current configuration supports updatesback to the
base table. The recordset CursorType, CursorLocation, and LockType
properties all influence update behavior. Last, the recordset should include
a primary key column to be updatable.
--
John Goodfellow
irtfnm
use john at goodfellowassoc dot com
wrote in message news:4949286@discussion.autodesk.com...
I've had great luck with the info provided here, thanks to all.
now my question
How can I tell if a table in Access is already open using VBA?