Multii User Application using ADO

2003-11-10 08:31:09 PM
Was wondering if anyone can help me. I am in the process of developing an
application which will be used by 10 or people. I am currently using a
AdoQuery and a TDBGrid.
My Grid is displaying data from more then 1 table, hence my SQL statement
has a number of 'inner joins' in it. My SQL Statement (AdoQuery 's TSQL
String) reads something like this :-
select Staff.*, StaffGroupLookUP.LookUpDesc AS StaffGroupDesc INTO
from Staff
INNER JOIN Lookup StaffGroupLookup
ON (Staff.StStaffGroup = StaffGroupLookUP.LookUpNo)
and StaffGroupLookUP.LookUpTable = 'Staff'
and StaffGroupLookUP.LookUpField = 'StaffGroupDesc'
select * from #TempStaff
The problem is that I want to know how I can get each user's application to
detect if the data on the Server has been updated or not by other users.
When I have a SQL statement which has no 'inner joins' or Temp tables, ADO
automatically informs the user that an update on a specific record has
occurred,. How can I get this to happen when I have a number of 'inner
joins' and also a Temp table?.
I also noticed that the lock types change (Optimistic to BatchOptimistic.)
when I place a 'inner join' condition and create a Temp table in SQL
(AdoQuery 's TSQL String)
Any assistants will be greatly appreciated.
Many thanks