Re: 0x800a0cb3 when Update record
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Thu, 16 Oct 2008 14:10:27 -0500
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:OTwx5C7LJHA.1204@xxxxxxxxxxxxxxxxxxxxxxx
Where's Bill Vaughn when you need
him?
Ain't that the truth! <g>
Maybe the join is the problem after all ... I'm just guessing here. Youmay
want to play with the "Unique Table" dynamic property of the recordset
object. I've never had to use it myself (preferring to use DML for data
modifications rather than recordsets) but there is documentation for it.
[Warning! Unsatisfactory response follows...]
I sort of backed off this question because of the same reasons Mr. Barrows
stated - I haven't really used C++ with ADO recently, and second I can't
spot any obvious problems, and third I hoped Vaughn or someone would show up
and explain it for me too. <g> Mainly because I never use Update (or AddNew)
with a complex query.
The reason why is, while whether a cursor is clientside or serverside and
the locktype are major factors in determining "updateablity", they are only
two of a whole host of factors that can effect "updateability". So while it
is often spoke of as an attribute of a Recordset the term should really be
applied to the whole transaction -connection attributes, providers, SQL,
engine, ...
Basically, ADO takes the initial query and builds its own Update SQL query
based on it. Sometimes it has enough information to build and execute it
'correctly' sometimes it does not. To add to the mystery ADO can also on
occasion go fetch 'missing' information (data elements not explicitly
supplied within the original query) to build its Update query. Other times
it appears to ignore the 'obvious' intent of the developer. <g>
This information is not necessarily static or absolutely deterministic - for
example the use of Optimistic locking - that may work (produce an
'updateable' query) when successful or fail if something else is going on.
Sometimes what is getting changed can effect whether the "query" is
updateable or not. Thus the dreaded intermittent errors.
Anyway, everytime I have had it explained to me - I understood it completely
until I got a cup of coffee. So in practice, even though the experts assure
me that allowing ADO to do its thing results in better performance - I
always punt and avoid Update and AddNew like the plague. <g>
Do a google search on "ADO Unique Properties Updateablity", etc You will
find a number of small posts dealing with specific aspects of the method.
But most of the important ugly details are buried in the various Books on
ADO.
-ralph
.
- Follow-Ups:
- Re: 0x800a0cb3 when Update record
- From: Ralph
- Re: 0x800a0cb3 when Update record
- References:
- 0x800a0cb3 when Update record
- From: Anders Eriksson
- Re: 0x800a0cb3 when Update record
- From: Ralph
- Re: 0x800a0cb3 when Update record
- From: Anders Eriksson
- Re: 0x800a0cb3 when Update record
- From: Anders Eriksson
- Re: 0x800a0cb3 when Update record
- From: Bob Barrows [MVP]
- Re: 0x800a0cb3 when Update record
- From: Anders Eriksson
- Re: 0x800a0cb3 when Update record
- From: Bob Barrows [MVP]
- Re: 0x800a0cb3 when Update record
- From: Anders Eriksson
- Re: 0x800a0cb3 when Update record
- From: Bob Barrows [MVP]
- 0x800a0cb3 when Update record
- Prev by Date: Re: 0x800a0cb3 when Update record
- Next by Date: Re: 0x800a0cb3 when Update record
- Previous by thread: Re: 0x800a0cb3 when Update record
- Next by thread: Re: 0x800a0cb3 when Update record
- Index(es):
Relevant Pages
|