Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 16259, Blobs information into Midas delta packet original record

by Manuel Parma Email: Anonymous

Delphi 4 to 7.
Blobs information into Midas delta packet original record
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 4.0  to 7.0 888 downloads
Copyright: No significant restrictions

Size: 1,775 bytes
Updated on Tue, 16 Sep 2003 07:41:23 GMT
Originally uploaded on Thu, 21 Jun 2001 12:23:41 GMT
SHA1 Hash: D73B43438B59634C5FB4F2E89A2BA258767E8044
MD5 Hash: A317136BBB21CDEF504A008656197EBE

    Explore the files in this upload

When using MIDAS if you use static SQL statements and your tables include blobs fields then is possible to lose blobs fields data because they are not included in delta packets when they were not modified.

Our model is based on an application server which use a data dictionary that lets users provide SQL statements (select, delete, insert and update). This way is possible to support diferent SQL servers. Nowadays we support Oracle, SQL Server 7, DB2 and SyBase.
Under this situation, SQL statements always include all fields and, by default, MIDAS only include modified fields data in delta packets. In an update SQL statement the application server needs blobs fields data always just to force an update operation and not to lose blobs fields data. For this reason we need to include blobs fields data in delta packets even if they were not modified. If we do not include blobs fields data in delta packets the application server receives null values for blobs fields data and blobs fields data in the database is lost after the update operation.

Source code below shows how to do that.

uses DbClient, DsIntf;

THackCds = class(TClientDataSet);

procedure IncludeBlobsInDelta(Cds: TClientDataSet; MaxLength: cardinal);
{Include blobs with lengths <= MaxLength this value in delta for 'original' record}
THackCds(Cds).DSBase.SetProp(dspropINCLBLOBSINDELTA, MaxLength);

NOTE: MIDAS generates SQL statements on the fly and if a field value is unasigned then that field is not included in the dinamically generated SQL statement. So if you do not use static SQL statement in your MIDAS application then you should not care about this issue.

Thanks to Pablo Reyes who helped me to search an write this hack.

Manuel Parma

For more information, see

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC04