 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Srdjan Guest
|
Posted: Wed Jul 20, 2005 1:40 pm Post subject: Sync([]) and INNER JOIN |
|
|
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
|
Posted: Thu Jul 21, 2005 12:46 pm Post subject: Re: Sync([]) and INNER JOIN |
|
|
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
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 |
|
 |
|
|
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
|
|