Recordset changes underlying table automatically

  • Thread starter Thread starter muster
  • Start date Start date
M

muster

Hi all,

I probably have a misunderstanding of the use of a ADO Recordset.

I thought a Recourdset is a view and if I change it without updating
the underlying table (data) wouldn't change. But what I was
experiencing was different.

I opened a recordset with a select query of a table then manipulated
the recordset. Suprisingly I found that the underlying table (a linked
table from a SQL server) changed. Is this the normal way that a
Recordset behave? If so, is there an easy way to avoid it? I have
tried different combination of Lock type and Cursor type but did not
succeed.

Thank you for any hints,
 
Use adLockBatchOptimistic and don't make any call to .UpdateBatch.
 
Use adLockBatchOptimistic and don't make any call to .UpdateBatch.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)










- Show quoted text -

Thanks. I tried that but got "unupdated records too many or too large"
message. Is there a way to change the default size of the UpdateBatch
cache?
 
Don't know about changing the size of UpdateBatch. You could also try to
disconnect the recordset and maybe it's also a CacheSize problem or the fact
that you are using a server side instead of a client side recordset.

However, I'm not sure to understand what you are trying to do here. If you
want a local table to manipulate your date, then you should use a local
table (or some kind of temporary table on the server) and not a recordset.
If you want a more powerful local data manipulation mecanism then switch to
..NET.
 
Sylvain Lafontaine said:
Don't know about changing the size of UpdateBatch. You could also try to
disconnect the recordset and maybe it's also a CacheSize problem or the
fact that you are using a server side instead of a client side recordset.

However, I'm not sure to understand what you are trying to do here. If
you want a local table to manipulate your date, then you should use a
local table (or some kind of temporary table on the server) and not a
recordset. If you want a more powerful local data manipulation mecanism
then switch to .NET.
 
Sylvain Lafontaine said:
Don't know about changing the size of UpdateBatch. You could also try to
disconnect the recordset and maybe it's also a CacheSize problem or the
fact that you are using a server side instead of a client side recordset.

However, I'm not sure to understand what you are trying to do here. If
you want a local table to manipulate your date, then you should use a
local table (or some kind of temporary table on the server) and not a
recordset. If you want a more powerful local data manipulation mecanism
then switch to .NET.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top