Capture changes on Mstable Field
Posted: Tue 29 May 2012 22:04
Good evening:
I used ODAC VCL components many years ago and based on the good results now i'm evaluating the last release of SDAC 6.1 for Delphi 6 (my version of IDE is 6 Enterprise with all the updates), the app needs to interact with MS SQL server 2000.And i'm having an unsolved issue maybe for my lack of Knowledge about sdac.
In my application i have a Msconnection,( always connected without login prompt) ,
A Mstable related to the connection (The table is always active and permantely refreshed
) a datasource with the Mstable as dataset , and a Dbgrid reflecting the changes of the MStable.The MS sql table is constantly being updated by another applications,and the changes in runtime are perfectly reflected, but if i try to capture the changes to process it nothing happends.
For illustration purposes the table is something like this:
SYMBOL _DATE TIME _LAST BID ASK
-----------------------------------------------------------------
AUDUSD ; 20120529 ; 08:10:43 ; 0.9849 ; 0.98316 ; 0.98342
CLPUSD ; 20120529 ; 08:10:18 ; 512.6 ; 512.6 ; 513.1
EURUSD ; 20120529 ; 08:10:43 ; 1.2538 ; 1.2524 ; 1.25251
GBPUSD ; 20120529 ; 08:10:42 ; 1.5678 ; 1.5664 ; 1.56684
I need to capture the changes in the "_Last" field , for that purposes i entered to the dataset manager , and in the Field events i only set a message on the "OnChange" event, to test if this is the right way :
procedure TForm1.MSTable1_LASTChange(Sender: TField);
begin
ShowMessage(MSTable1.Fields[3].Text);
end;
Running the application , the data changes constantly but there's no meesage dislayed.
Can you Give me some idea about what i'm doing wrong with SDAC?
Best Regards
Leonardo.
I used ODAC VCL components many years ago and based on the good results now i'm evaluating the last release of SDAC 6.1 for Delphi 6 (my version of IDE is 6 Enterprise with all the updates), the app needs to interact with MS SQL server 2000.And i'm having an unsolved issue maybe for my lack of Knowledge about sdac.
In my application i have a Msconnection,( always connected without login prompt) ,
A Mstable related to the connection (The table is always active and permantely refreshed
) a datasource with the Mstable as dataset , and a Dbgrid reflecting the changes of the MStable.The MS sql table is constantly being updated by another applications,and the changes in runtime are perfectly reflected, but if i try to capture the changes to process it nothing happends.
For illustration purposes the table is something like this:
SYMBOL _DATE TIME _LAST BID ASK
-----------------------------------------------------------------
AUDUSD ; 20120529 ; 08:10:43 ; 0.9849 ; 0.98316 ; 0.98342
CLPUSD ; 20120529 ; 08:10:18 ; 512.6 ; 512.6 ; 513.1
EURUSD ; 20120529 ; 08:10:43 ; 1.2538 ; 1.2524 ; 1.25251
GBPUSD ; 20120529 ; 08:10:42 ; 1.5678 ; 1.5664 ; 1.56684
I need to capture the changes in the "_Last" field , for that purposes i entered to the dataset manager , and in the Field events i only set a message on the "OnChange" event, to test if this is the right way :
procedure TForm1.MSTable1_LASTChange(Sender: TField);
begin
ShowMessage(MSTable1.Fields[3].Text);
end;
Running the application , the data changes constantly but there's no meesage dislayed.
Can you Give me some idea about what i'm doing wrong with SDAC?
Best Regards
Leonardo.