Re: batchoptimistic referesh data in second table in the join
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Sun, 05 Mar 2006 21:27:46 -0600
I have Join sql fro two tables, i want after insert or edit to refresh the
other data
Example
SELECT dbo.[Order Details].OrderID, dbo.[Order Details].ProductID,
dbo.[Order Details].UnitPrice, dbo.[Order Details].Quantity,
dbo.Products.ProductName
FROM dbo.[Order Details] INNER JOIN
dbo.Products ON dbo.[Order Details].ProductID =
dbo.Products.ProductID
after inserting the ProductID and post in batchOptimistic AdoDataSet doesn't
update ProductName is kept empty
is there anyway to resolve this problem
You need to do a recordset Resync
with ADODataset1 do begin
UpDateCursorPos; {MUST ALWAYS DO!}
RecordSet.Resync(adAffectCurrent, adResyncAllValues);
ReSync([]); {May not be needed}
end;
But before that will work you need to set the "Resync Command" property
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdprodynresynccommand.asp
TBetterADOdataset which is a TAdoDataset descendant makes this a lot easer
http://betterado.hit.bg/
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- References:
- batchoptimistic referesh data in second table in the join
- From: M.Ibrahim
- batchoptimistic referesh data in second table in the join
- Prev by Date: Re: Loading Image in MS Access Long Binary Data
- Next by Date: Check if MS access db table column has primary key(using ADOX_TLB.pas, ADODB_TLB.pas)?
- Previous by thread: batchoptimistic referesh data in second table in the join
- Next by thread: delphi 7 & ADOquery
- Index(es):