Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Opposite function to ConvertToLiteral?
Fri, Oct 2 2015 1:16 PMPermanent Link

Ralf Mimoun

Hi all,

I modified dbsrver so it logs changes to records in a log table. To log the changes, I use some fields, like "TableName", "Timestamp", "User", "Operation" (Insert, Update, Delete) and "Data". That "Data" memo field stores the changes, like

OLD LastName='Smith'
OLD Address='First Street'+#13+#10+'Chicago'
NEW LastName='Miller'
OLD Address='Main Street'+#13+#10+'Faraway'

Pretty straight forward and more or less readable. But now I have to read the values and show them in a nice UI. I use the dbisamlb function ConvertToLiteral to make the values "storage friendly".

What I need is a ConvertFromLiteral function, which trows away all the ', handles the '' special cases and converts all #<number> in the right chars. I could do that on myself, but maybe someone has something right in his toolbox.
Mon, Oct 5 2015 10:28 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ralf,

<< I modified dbsrver so it logs changes to records in a log table. To log the changes, I use some fields, like "TableName", "Timestamp", "User", "Operation" (Insert, Update, Delete) and "Data". That "Data" memo field stores the changes, like >>

Check out the mirroring dbsrvr code here:

http://www.elevatesoft.com/blog?action=view&id=mirroring_dbisam_database_server_code

It has code that converts data back and forth to text like this for logging/replication purposes.  It doesn't use ConvertToLiteral, though, and only handles CRLF pairs.

Tim Young
Elevate Software
www.elevatesoft.com
Image