Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 7 of 7 total |
ServerEngine |
Tue, Feb 7 2006 4:31 AM | Permanent Link |
"Stanimir Petkov" | Hi,
Is it possible to do add the following code in dbsrvr ServerEngineAfterUpdateTrigger event: -Creating memory table -Adding FieldDefs: TableName, RecID+FieldDefs of changed fields (NewValue<>OldValue) -Saving Fields from CurrentRecord to memory table -Saving Memory table to stream (MyBlobStream) in the (local) table (UpdateTrackingTable blob flield) and saving to disk. Thanks Stanimir |
Tue, Feb 7 2006 11:35 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Stanimir,
<< Is it possible to do add the following code in dbsrvr ServerEngineAfterUpdateTrigger event: -Creating memory table -Adding FieldDefs: TableName, RecID+FieldDefs of changed fields (NewValue<>OldValue) -Saving Fields from CurrentRecord to memory table -Saving Memory table to stream (MyBlobStream) in the (local) table (UpdateTrackingTable blob flield) and saving to disk. >> Are you trying to save the BLOB stream into the same table that is firing the AfterUpdateTrigger ? If so, then no, because that will cause infinite recursion. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Feb 8 2006 2:10 PM | Permanent Link |
"Stanimir Petkov" | Hi Tim,
Sorry for bad example, I mean to store "MemoryTable" in the blob field of external table named "UpdateTrackingTable". In other words is it possible to put tables on server form? Thanks Stanimir |
Thu, Feb 9 2006 12:09 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Stanimir,
<< Sorry for bad example, I mean to store "MemoryTable" in the blob field of external table named "UpdateTrackingTable". In other words is it possible to put tables on server form? >> Yes, and yes, you can store the "MemoryTable" table in the BLOB field. See this link on more information on streaming tables: http://www.elevatesoft.com/dbisam4d5_loading_saving_streams.htm Basically you'll need to use the SaveToStream method of the MemoryTable to save its contents to a TMemoryStream. Then you can use the TBlobField.LoadFromStream method to load the TMemory stream into the desired BLOB field in the UpdateTrackingTable. It's really quite simple. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 10 2006 6:32 AM | Permanent Link |
"Stanimir Petkov" | Thanks,
And will bi possible to track updates of database "C:\MyDatabase" and store result in "UpdateTrackTable" stored in database "C:\Log" for examle, without troubles with serverengine? Stanimir |
Fri, Feb 10 2006 2:59 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Stanimir,
<< And will bi possible to track updates of database "C:\MyDatabase" and store result in "UpdateTrackTable" stored in database "C:\Log" for examle, without troubles with serverengine? >> Sure, no problem. Just make sure that the UpdateTrackTable component is created dynamically in the AfterUpdateTrigger event handler, and that you assign the proper SessionName using the passed TDBISAMSession object: procedure TMainForm.DBISAMEngine1AfterUpdateTrigger(Sender: TObject; TriggerSession: TDBISAMSession; TriggerDatabase: TDBISAMDatabase; const TableName: String; CurrentRecord: TDBISAMRecord); var UpdateTrackTable: TDBISAMTable; begin UpdateTrackTable:=TDBISAMTable.Create(nil); try with UpdateTrackTable do begin SessionName:=TriggerSession.SessionName; DatabaseName:='c:\log'; TableName:='UpdateTrackTable'; Open; { Put memory stream into BLOB field of UpdateTrackTable here } end; finally UpdateTrackTable.Free; end; end; -- Tim Young Elevate Software www.elevatesoft.com |
Sat, Feb 11 2006 4:22 AM | Permanent Link |
"Stanimir Petkov" | Tim,
Thanks alot! Stanimir |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |