Subject | BLOB field translated incorrectly with varaints |
---|---|
Author | Ed Dressel |
Post date | 2012-07-03T17:53:43Z |
XE2
I have a blob field in a table that is being translated incorrectly to a wide string when I have a variant that holds the text data.
I have the following table:
CREATE TABLE MyTable (
...
MyBlob DM_BLOB
);
where DM_BLOB is defined as
CREATE DOMAIN DM_BLOB AS
BLOB SUB_TYPE 0 SEGMENT SIZE 80
DEFAULT NULL;
In accessing the data through a TIBOQuery, the following code works just fine:
Memo1.Lines.Text := FqryTable.FieldByName('MyBlob').AsString;
But the following does not work (where lvar is a variant):
lvar := FqryTables.FieldByName('MyBlob').Value;
Memo2.Lines.Text := lVar;
In my app I cannot get away from having the value of 'MyBlob' held by a variant. Is there a way to get it translated correctly from a variant to a ANSI String?
Thanks
Ed Dressel
I have a blob field in a table that is being translated incorrectly to a wide string when I have a variant that holds the text data.
I have the following table:
CREATE TABLE MyTable (
...
MyBlob DM_BLOB
);
where DM_BLOB is defined as
CREATE DOMAIN DM_BLOB AS
BLOB SUB_TYPE 0 SEGMENT SIZE 80
DEFAULT NULL;
In accessing the data through a TIBOQuery, the following code works just fine:
Memo1.Lines.Text := FqryTable.FieldByName('MyBlob').AsString;
But the following does not work (where lvar is a variant):
lvar := FqryTables.FieldByName('MyBlob').Value;
Memo2.Lines.Text := lVar;
In my app I cannot get away from having the value of 'MyBlob' held by a variant. Is there a way to get it translated correctly from a variant to a ANSI String?
Thanks
Ed Dressel