Board index » cppbuilder » OLDVALUE, NEWVALUE

OLDVALUE, NEWVALUE


2004-10-23 09:56:07 PM
cppbuilder73
Hi all,
How can I keep track of any modifications done in a anytable into another
sentinel table of 5 fields
DATETIME, USER, TABLEMODIFIED, OLDVALUE, NEWVALUE
Thanks
I am using C++ Builder 4 and Interbase 6
 
 

Re:OLDVALUE, NEWVALUE

Good Day,
The first thing is, are you using something like MIDAS? If you are, then on the appserver, you can intercept the updates from the DataSetProvider, in the BeforeAppLyUpdates event. From here, you will have access to the dataset that has all the records being updated. However, this method deals with ALL the update type, Insert/Delete/Update. You may want to consider working with the TQuery, as this will deal with each record at a time. This gice you more individualized control of each record. Well - thats completely up to you.
If on the other hand, you are NOT using something like MIDAS, then, you may want to try and structure your application in such a way that all Insert/Delete/Update go through some very specific function calls. In the case of an update, you can now capture what is being changed, and take the necessary action.
I might also suggest that if your application is NOT a Multi-Tier app, consider make use of TClientDataSets. This may be confusing, but the benefits are great. There is a very nice article on how to employ this in a 2 tier app in the BDN under C++.
Of course, you must understand that I gather from this email that you are building a two tier app. If not, sorry for the 2tier babble...
HTH,
Nick
"Alain Bastien" < XXXX@XXXXX.COM >wrote:
Quote

Hi all,

How can I keep track of any modifications done in a anytable into another
sentinel table of 5 fields
DATETIME, USER, TABLEMODIFIED, OLDVALUE, NEWVALUE

Thanks


I am using C++ Builder 4 and Interbase 6



 

Re:OLDVALUE, NEWVALUE

Hi,
I am using C++ Builder 4 Enterprise and there are the MIDAS components.
I Query for one record load them in TEdit and TImage Tmemo etc ...
Proceed to modification in the TEDIT etc and instead of the INSERT Tquery
its an UPDATE TQuery
But if only one field or Two has been modify
e.g if a Picture has been swaped in the TImage or Tmemo erased and
replaced
Thanks giving me more details
Alain
Nick Rambarransingh < XXXX@XXXXX.COM >wrote in message
Quote

Good Day,

The first thing is, are you using something like MIDAS? If you are,
then on the appserver, you can intercept the updates from the
DataSetProvider, in the BeforeAppLyUpdates event. From here, you will have
access to the dataset that has all the records being updated. However, this
method deals with ALL the update type, Insert/Delete/Update. You may want
to consider working with the TQuery, as this will deal with each record at a
time. This gice you more individualized control of each record. Well -
thats completely up to you.
Quote

If on the other hand, you are NOT using something like MIDAS, then, you
may want to try and structure your application in such a way that all
Insert/Delete/Update go through some very specific function calls. In the
case of an update, you can now capture what is being changed, and take the
necessary action.
Quote

I might also suggest that if your application is NOT a Multi-Tier app,
consider make use of TClientDataSets. This may be confusing, but the
benefits are great. There is a very nice article on how to employ this in a
2 tier app in the BDN under C++.
Quote

Of course, you must understand that I gather from this email that you
are building a two tier app. If not, sorry for the 2tier babble...

HTH,
Nick

"Alain Bastien" < XXXX@XXXXX.COM >wrote:
>
>Hi all,
>
>How can I keep track of any modifications done in a anytable into
another
>sentinel table of 5 fields
>DATETIME, USER, TABLEMODIFIED, OLDVALUE, NEWVALUE
>
>Thanks
>
>
>I am using C++ Builder 4 and Interbase 6
>
>
>

 

{smallsort}

Re:OLDVALUE, NEWVALUE

Salut,
Ok, so you are using MIDAS. Then you want to concentrate your efforts in two places. The first would be at the DSP, where you can intercept records before they are applied to the database. To do that, look in the help for BeforeApplyUpdates. On the other hand, look at the events associated with the TQuery.
On a slightly different note, you want to try and move to CBuilder 5 Ent or higher, at your earliest oppourtunity.
hth,
Nick
"Alain Bastien" < XXXX@XXXXX.COM >wrote:
Quote
Hi,

I am using C++ Builder 4 Enterprise and there are the MIDAS components.
I Query for one record load them in TEdit and TImage Tmemo etc ...
Proceed to modification in the TEDIT etc and instead of the INSERT Tquery
its an UPDATE TQuery
But if only one field or Two has been modify
e.g if a Picture has been swaped in the TImage or Tmemo erased and
replaced

Thanks giving me more details


Alain

Nick Rambarransingh < XXXX@XXXXX.COM >wrote in message
news:417a7b9d$ XXXX@XXXXX.COM ...
>
>Good Day,
>
>The first thing is, are you using something like MIDAS? If you are,
then on the appserver, you can intercept the updates from the
DataSetProvider, in the BeforeAppLyUpdates event. From here, you will have
access to the dataset that has all the records being updated. However, this
method deals with ALL the update type, Insert/Delete/Update. You may want
to consider working with the TQuery, as this will deal with each record at a
time. This gice you more individualized control of each record. Well -
thats completely up to you.
>
>If on the other hand, you are NOT using something like MIDAS, then, you
may want to try and structure your application in such a way that all
Insert/Delete/Update go through some very specific function calls. In the
case of an update, you can now capture what is being changed, and take the
necessary action.
>
>I might also suggest that if your application is NOT a Multi-Tier app,
consider make use of TClientDataSets. This may be confusing, but the
benefits are great. There is a very nice article on how to employ this in a
2 tier app in the BDN under C++.
>
>Of course, you must understand that I gather from this email that you
are building a two tier app. If not, sorry for the 2tier babble...
>
>HTH,
>Nick
>
>"Alain Bastien" < XXXX@XXXXX.COM >wrote:
>>
>>Hi all,
>>
>>How can I keep track of any modifications done in a anytable into
another
>>sentinel table of 5 fields
>>DATETIME, USER, TABLEMODIFIED, OLDVALUE, NEWVALUE
>>
>>Thanks
>>
>>
>>I am using C++ Builder 4 and Interbase 6
>>
>>
>>
>


 

Re:OLDVALUE, NEWVALUE

Hi,
About upgrading !!! I think that C++ Builder 4 Ent have it all because I
moved from Delphi 2 to C++ Buiilder 3 then 4 Ent
required a lot of recoding and readaptation and even certain function
incompatibility found between Builder 3 and 4
So, 5 or Higher where does it stop !! even Windoz, tried several versions
but came back to 98SE and even Linux
tried several version but came back to the 9.0 Mandrake
I think that this version is limited to the imagination of the user and may
require a few additional coding to get the work done properly. The solution
is out there or in there and the objective is not to be uptodate but get the
work done
I think I'm out of subject here
Correct me if I am wrong.
Thanks again
Alain
Nick Rambarransingh < XXXX@XXXXX.COM >wrote in message
Quote

Salut,

Ok, so you are using MIDAS. Then you want to concentrate your efforts
in two places. The first would be at the DSP, where you can intercept
records before they are applied to the database. To do that, look in the
help for BeforeApplyUpdates. On the other hand, look at the events
associated with the TQuery.
Quote

On a slightly different note, you want to try and move to CBuilder 5 Ent
or higher, at your earliest oppourtunity.

hth,
Nick


"Alain Bastien" < XXXX@XXXXX.COM >wrote:
>Hi,
>
>I am using C++ Builder 4 Enterprise and there are the MIDAS components.
>I Query for one record load them in TEdit and TImage Tmemo etc ...
>Proceed to modification in the TEDIT etc and instead of the INSERT
Tquery
>its an UPDATE TQuery
>But if only one field or Two has been modify
>e.g if a Picture has been swaped in the TImage or Tmemo erased and
>replaced
>
>Thanks giving me more details
>
>
>Alain
>
>Nick Rambarransingh < XXXX@XXXXX.COM >wrote in message
>news:417a7b9d$ XXXX@XXXXX.COM ...
>>
>>Good Day,
>>
>>The first thing is, are you using something like MIDAS? If you are,
>then on the appserver, you can intercept the updates from the
>DataSetProvider, in the BeforeAppLyUpdates event. From here, you will
have
>access to the dataset that has all the records being updated. However,
this
>method deals with ALL the update type, Insert/Delete/Update. You may
want
>to consider working with the TQuery, as this will deal with each record
at a
>time. This gice you more individualized control of each record. Well -
>thats completely up to you.
>>
>>If on the other hand, you are NOT using something like MIDAS, then,
you
>may want to try and structure your application in such a way that all
>Insert/Delete/Update go through some very specific function calls. In
the
>case of an update, you can now capture what is being changed, and take
the
>necessary action.
>>
>>I might also suggest that if your application is NOT a Multi-Tier
app,
>consider make use of TClientDataSets. This may be confusing, but the
>benefits are great. There is a very nice article on how to employ this
in a
>2 tier app in the BDN under C++.
>>
>>Of course, you must understand that I gather from this email that you
>are building a two tier app. If not, sorry for the 2tier babble...
>>
>>HTH,
>>Nick
>>
>>"Alain Bastien" < XXXX@XXXXX.COM >wrote:
>>>
>>>Hi all,
>>>
>>>How can I keep track of any modifications done in a anytable into
>another
>>>sentinel table of 5 fields
>>>DATETIME, USER, TABLEMODIFIED, OLDVALUE, NEWVALUE
>>>
>>>Thanks
>>>
>>>
>>>I am using C++ Builder 4 and Interbase 6
>>>
>>>
>>>
>>
>
>