I need to update/insert a record into an Access2000 table using ADO. I can
only open the connection using adModeReadWrite and not those
adModeShareDenyWrite etc, is this the suppose way? Also, to insert/update a
table in Access2000 mdb, which cursor type is better, client-side or
server-side? FYI, my mdb is a multiuser-sharing mdb through LAN.
J.
Check my reply about same question for Chris James. It is just 6 posting
below yours (same June 25, 2002 in same newsgroup)
--
Val Mazur
Microsoft MVP
"J" <jser...@yahoo.com> wrote in message
news:exc2OOLHCHA.2388@tkmsftngp09...
"Val Mazur" <grou...@hotmail.com> wrote in message
news:uD49a2QHCHA.1904@tkmsftngp08...
This is what I posted on Chir's question
Hi Chris,
It is hard to say which cursor to use, butt... You should consider next
issues when you select cursor type;
1. Both cursor types allow updating, deleting and inserting records. In case
of server side cursor, your recordset stays connected to DB and when you
update recordset, then all changes go to DB right away.
In case of client side cursor you could disconnect recordset from DB and
make changes to recordset locally. DB does not see any changes until you
reconnect recordset back and call UpdateBatch. In that case all changes,
which you did in recordset, will be applied against database in one shot.
That technique works fast, because
a) disconnected recordset does not keep server busy
b) all changes will be done in one shot
2) In case of client side cursor you could loose in performance during
opening of recordset, because client side requires to transfer all retrieved
records to client side. In case if amount of records is big, provider could
spend some time to do that. In case of server-side cursor, provider
transfers records by-demand, when you move pointer inside recordset.
So, you should select which one is more appropriate for you. In case if you
will make optimized stored procedures and would select only relatively small
amount of records, I would suggest to use client-side cursor
--
Val Mazur
Microsoft MVP
"J" <jser...@yahoo.com> wrote in message
news:#$MFYDYHCHA.1744@tkmsftngp13...
"Val Mazur" <grou...@hotmail.com> wrote in message
news:uMPltxcHCHA.1604@tkmsftngp12...
Basically UpdateBatch is same as Update, but provides bulk changes in one
shot. To use UpdateBatch you have to have primary key on your table.
Here are some links, with examples for UpdateBatch
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q184397
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q195082
Second one is not for VB, but could be useful as well
--
Val Mazur
Microsoft MVP
"J" <jser...@yahoo.com> wrote in message
news:eD3ubSkHCHA.1596@tkmsftngp13...