BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sync([]) and INNER JOIN

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Srdjan
Guest





PostPosted: Wed Jul 20, 2005 1:40 pm    Post subject: Sync([]) and INNER JOIN Reply with quote



In MS SQL server I have INNERR JOIN on two tables in my TADODataSet
with following fields :

SELECT dok.*, part.Name
FROM Documents dok
INNER JOIN Partners part
ON dok.Partner=part.Number

And when I change partner references key (dok.Partner)
in my Documents table
In DBGrid, with the code bellow, part.Name is NOT refreshed

if Myadodataset.State in [ dsBrowse] then
try
Myadodataset.UpdateCursorPos;

Myadodataset.Recordset.Resync(adAffectCurrent,adResyncAllValues);
Myadodataset.Resync([]);
except
end;

Any idea for this problem !

Thanx
Srdjan
Back to top
Srdjan
Guest





PostPosted: Thu Jul 21, 2005 12:46 pm    Post subject: Re: Sync([]) and INNER JOIN Reply with quote



Problem is solved

RESYNC is not supported when dataset has a INNER JOIN on a few tables
if we have situation like this, we must use recordset REQUERY

here's a description :
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B250548

Wish you luck Smile
Srdjan


On Wed, 20 Jul 2005 15:40:29 +0200, Srdjan <s@s.com> wrote:

Quote:
In MS SQL server I have INNERR JOIN on two tables in my TADODataSet
with following fields :

SELECT dok.*, part.Name
FROM Documents dok
INNER JOIN Partners part
ON dok.Partner=part.Number

And when I change partner references key (dok.Partner)
in my Documents table
In DBGrid, with the code bellow, part.Name is NOT refreshed

if Myadodataset.State in [ dsBrowse] then
try
Myadodataset.UpdateCursorPos;

Myadodataset.Recordset.Resync(adAffectCurrent,adResyncAllValues);
Myadodataset.Resync([]);
except
end;

Any idea for this problem !

Thanx
Srdjan


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.