Resync , Identity, Join Horror Story

Resync , Identity, Join Horror Story

Post by Bill Hone » Tue, 27 Jul 1999 04:00:00



I have a table with an Ident column.

How to I get my ADODC control to show the newly inserted ident without
refreshing the entire recordset ?

Resync keeps telling me the key has changed, and that its deleted the
local record (useful)

Once I've sorted this out,  I want to replace my single table with a
join & get the right-side to be re-queried (one step at a time ...)

Bill
-----------------------
 Dr. Bill Honey        
 Collage Consulting Ltd.                    

 
 
 

Resync , Identity, Join Horror Story

Post by Patrick Stenze » Wed, 28 Jul 1999 04:00:00


Ther will be an SQL Server 7.0 Update with an error list which will be
solved on the MSDN Sites
please have a look, and when you succeed, then let me know

http://support.microsoft.com/support/kb/articles/Q225/0/19.ASP

greetings
Joachim Woehler, sitting at Patricks Machine !!


Quote:>I have a table with an Ident column.

>How to I get my ADODC control to show the newly inserted ident without
>refreshing the entire recordset ?

>Resync keeps telling me the key has changed, and that its deleted the
>local record (useful)

>Once I've sorted this out,  I want to replace my single table with a
>join & get the right-side to be re-queried (one step at a time ...)

>Bill
>-----------------------
> Dr. Bill Honey
> Collage Consulting Ltd.


 
 
 

Resync , Identity, Join Horror Story

Post by Rupert Pearc » Thu, 29 Jul 1999 04:00:00


Bill,
Resync is useful if you want to synchronise the recordset with the
underlying database e.g. to reflect changes another user may have made.

MSDN help states: "Unlike the Requery method, the Resync method does not
re-execute the Recordset object's underlying command; new records in the
underlying database will not be visible."

The new row must be in the recordset so depending on which row you added
(ie. what the key is) would it help to use MoveLast, or a combination of
MovePrevious+MoveNext ?

Just an idea,

Rupert


>I have a table with an Ident column.

>How to I get my ADODC control to show the newly inserted ident without
>refreshing the entire recordset ?

>Resync keeps telling me the key has changed, and that its deleted the
>local record (useful)

>Once I've sorted this out,  I want to replace my single table with a
>join & get the right-side to be re-queried (one step at a time ...)

>Bill
>-----------------------
> Dr. Bill Honey
> Collage Consulting Ltd.

 
 
 

Resync , Identity, Join Horror Story

Post by Bill Hone » Thu, 29 Jul 1999 04:00:00


Rupert ,

No that doesn't work.  On the Client end, all the newly added records
(adodc1.recordset.addnew) have an ident of 0 (Even with RS moves ).
If you look at the server end, they are all populated properly.  

Requery does the trick,  but I have to suck the entire recordset
across the network again just to get at  single value.
what I want is a sort of Requery CurrentRowOnly.  I thought Resync
would do this,  but it just errors with tables that have Ident fields.

Any other ideas ? ?

Bill


>Bill,
>Resync is useful if you want to synchronise the recordset with the
>underlying database e.g. to reflect changes another user may have made.

>MSDN help states: "Unlike the Requery method, the Resync method does not
>re-execute the Recordset object's underlying command; new records in the
>underlying database will not be visible."

>The new row must be in the recordset so depending on which row you added
>(ie. what the key is) would it help to use MoveLast, or a combination of
>MovePrevious+MoveNext ?

>Just an idea,

>Rupert


>>I have a table with an Ident column.

>>How to I get my ADODC control to show the newly inserted ident without
>>refreshing the entire recordset ?

>>Resync keeps telling me the key has changed, and that its deleted the
>>local record (useful)

>>Once I've sorted this out,  I want to replace my single table with a
>>join & get the right-side to be re-queried (one step at a time ...)

>>Bill
>>-----------------------
>> Dr. Bill Honey
>> Collage Consulting Ltd.

---------------------------------------------------------------
 Dr. Bill Honey        I.T. Consultant
    Collage Consulting Ltd.
    Tel  0973 837620

---------------------------------------------------------------
 
 
 

Resync , Identity, Join Horror Story

Post by Lotha » Thu, 29 Jul 1999 04:00:00


If you are using SQL Server 7.0, you can insert the records using a
server-side keyset cursor. If you are using SQL Server 6.5 or earlier, you


> Rupert ,

> No that doesn't work.  On the Client end, all the newly added records
> (adodc1.recordset.addnew) have an ident of 0 (Even with RS moves ).
> If you look at the server end, they are all populated properly.

> Requery does the trick,  but I have to suck the entire recordset
> across the network again just to get at  single value.
> what I want is a sort of Requery CurrentRowOnly.  I thought Resync
> would do this,  but it just errors with tables that have Ident fields.

> Any other ideas ? ?

> Bill


> >Bill,
> >Resync is useful if you want to synchronise the recordset with the
> >underlying database e.g. to reflect changes another user may have made.

> >MSDN help states: "Unlike the Requery method, the Resync method does not
> >re-execute the Recordset object's underlying command; new records in the
> >underlying database will not be visible."

> >The new row must be in the recordset so depending on which row you added
> >(ie. what the key is) would it help to use MoveLast, or a combination of
> >MovePrevious+MoveNext ?

> >Just an idea,

> >Rupert


> >>I have a table with an Ident column.

> >>How to I get my ADODC control to show the newly inserted ident without
> >>refreshing the entire recordset ?

> >>Resync keeps telling me the key has changed, and that its deleted the
> >>local record (useful)

> >>Once I've sorted this out,  I want to replace my single table with a
> >>join & get the right-side to be re-queried (one step at a time ...)

> >>Bill
> >>-----------------------
> >> Dr. Bill Honey
> >> Collage Consulting Ltd.

> ---------------------------------------------------------------
>  Dr. Bill Honey        I.T. Consultant
>     Collage Consulting Ltd.
>     Tel  0973 837620

> ---------------------------------------------------------------