Re: Help on resolving record conflicts with ADO




A while ago it was suggested that I try this:

ADODataSet1.RecordSet.ReSync(adAffectCurrent, adResyncAllValues);
ADODataSet1.UpdateCursorPos;
ADODataSet1.Cancel;
Action := daAbort;

If my select statement is from 1 table, the above code works fine, but if I
include any fields from another table through a left outer join (the other
table's field is for display purposes only) then the above code crashes with
'Key value for this row was changed or deleted at the data store. The local
row is now deleted.'. My select statement contains the primary key for the
table I want to update, and only one field from the other table. I've tried
BetterADO with no success. I'm wondering if the problem is how I'm building
the select statement, but I don't see any other way to do what I need to do.

SELECT table1.id, table1.name, table1.amount, table2.displayfield FROM
table1 LEFT OUTER JOIN table2 ON table1.id = table2.
id
As I said in the last message you can not properly resysnc a Join without
writing a "Resync_command"

Also I can point out that what you are trying to do seems better suited to using
a lookup field than to using an outer join
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.



Relevant Pages

  • Re: SQL Subquery on Max(date)
    ... The overall query I'm trying to insert this select into ... LEFT OUTER JOIN ... CONSTRAINT pk_oncd_company ... PRIMARY KEY, ...
    (microsoft.public.access.formscoding)
  • Re: help
    ... An outer join is a join that allows you to retrieve ALL the records from ... About the primary key, I don't have the ... another table where I would only have one thing per employee ID, ... >> MS Access MVP ...
    (microsoft.public.access.queries)
  • Re: No duplicates
    ... You need what is called an Outer Join. ... colour - Text - Primary Key ... Jason Lepack ... ladybug via AccessMonster.com wrote: ...
    (microsoft.public.access.modulesdaovba)
  • Re: dataset merging
    ... the primary key property does the trick. ... If you try to merge rows and the rows have the same primary key, but you're trying to merge columns of the same row, you'll have trouble. ... Basically I want to perform an outer join operation on a dataset and the resulting sql query based on the contents of said dataset. ...
    (microsoft.public.dotnet.framework.aspnet)