Re: 0x800a0cb3 when Update record




"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. You
may
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


.



Relevant Pages

  • RE: ODBC query in VB code Need HELP
    ... Everything for ADO is in the first 2 messages that I gave you. ... Since your pass-through query already exists (including the ... Dim STRSQL As String ...
    (microsoft.public.access.formscoding)
  • Re: Connecting to Query
    ... practice examples of the ADO Command, Parameters, etc. you explained below. ... Second, with the selected territory ... >> combo box to select a product from a query based primarily on a link ...
    (microsoft.public.access.formscoding)
  • Re: On ADSI and LDAP
    ... the problem is how can I retrieve the value for myuser using the ... would be more efficient to use ADO to query AD for the attributes values. ... For more on using ADO, ... Dim adoCommand, adoConnection, strBase, strFilter, strAttributes ...
    (microsoft.public.scripting.vbscript)
  • Re: cant get query to run over ADO, but works fine in Access inte
    ... Thanks for the suggestions, Richard. ... the query so that unchanging parts of it are stored as a query with the part ... As I've had trouble with synchronizing ADO ... > Execute method of the ADO Connection object, but the issue is the same - you ...
    (microsoft.public.data.ado)
  • Re: Stored Procedure is running slow!
    ... > I run stored procedure from QA, it takes some 15 seconds to execute. ... > seconds when called from MS Fox Pro, via ADO. ... Try this in Query Analyzer: ... By default Query Analyzer runs with ARITHABORT ON, ...
    (microsoft.public.sqlserver.programming)