VirtualQuery - BLOB

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

VirtualQuery - BLOB

Post by AlainANTOCI » Mon 02 May 2022 09:36

Hi,

with the code below :

var
SQ: TUniQuery;
TQ: TUniTable;
VQ: TVirtualQuery;
begin
SQ := TUniQuery.Create(nil);
TQ := TUniTable.Create(nil);
VQ := TVirtualQuery.Create(nil);

SQ.Connection := FicheModuleDonnees.Connection;
TQ.Connection := FicheModuleDonnees.ConnectionEX;

SQ.Sql.Text := 'SELECT * FROM T_STEP';

TQ.TableName := 'T_STEP';

VQ.SourceDataSets.Add(SQ,'','SOURCE');
VQ.SourceDataSets.Add(TQ,'','DESTINATION');

VQ.Sql.Text := 'INSERT INTO DESTINATION SELECT * FROM SOURCE';

TQ.Open;

SQ.Open;

VQ.ExecSQL;
end;

I have an Error : EVariantOutOfMemoryError if I select all fields, if I exclude BLOB fields it works fine, is there anything to do ?

Last version of Unidac, Delphi XE8, 32 project.

Thanks

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: VirtualQuery - BLOB

Post by MaximG » Thu 05 May 2022 18:45

We've tested VirtualDAC according to your description of the issue, no issues have been found. Please create and send us a sample project with source code where the issue can be reproduced. Also we need the DDL script that creates the tables that you use in the sample project. For your convenience, please use the e-support form https://www.devart.com/company/contactform.html

AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

Re: VirtualQuery - BLOB

Post by AlainANTOCI » Fri 06 May 2022 07:14

Hi,
I Think i've found the problem one record have a blob > 300 Mb. But if the done the same code without VitrualQuery it Works.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: VirtualQuery - BLOB

Post by MaximG » Fri 06 May 2022 12:34

Thank you for the information. We will investigate the described issue and let you know the results shortly.

AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

Re: VirtualQuery - BLOB

Post by AlainANTOCI » Wed 18 May 2022 08:41

I try to do a simple code to reproduce my problem :

var
SQ: TUniQuery;
TQ: TUniTable;
VQ: TVirtualQuery;
begin
SQ := TUniQuery.Create(nil);

SQ.Connection := FicheModuleDonnees.Connection; //---- ORACLE 19c

SQ.Sql.Text := 'DROP TABLE TEST';

try
SQ.ExecSql;

except on Exception do
end;

SQ.Sql.Text := 'DROP TABLE TEST2';

try
SQ.ExecSql;

except on Exception do
end;

SQ.Sql.Text := 'CREATE TABLE TEST (ID VARCHAR2(1),BTEXT BLOB)';

SQ.ExecSql;

SQ.Sql.Text := 'CREATE TABLE TEST2 (ID VARCHAR2(1),BTEXT BLOB)';

SQ.ExecSql;

SQ.Sql.Text := 'INSERT INTO TEST (ID,BTEXT) VALUES (:ID,:BTEXT)';
SQ.Params[0].DataType := ftString;
SQ.Params[1].DataType := ftBlob;

SQ.Params[0].AsString := 'A';
SQ.Params[1].LoadFromFile('E:\xx.xls',ftBlob); //---- File > 60 Mb

SQ.ExecSql;

TQ := TUniTable.Create(nil);
VQ := TVirtualQuery.Create(nil);

TQ.Connection := FicheModuleDonnees.Connection;

SQ.Sql.Text := 'SELECT * FROM TEST';

TQ.TableName := 'TEST2';

TQ.Open;

VQ.SourceDataSets.Add(SQ,'','TEST');
VQ.SourceDataSets.Add(TQ,'','TEST2');

VQ.Sql.Text := 'INSERT INTO TEST2 SELECT * FROM TEST';

SQ.Open;

VQ.ExecSQL; //---- Error at this line : Table TEST2 as 3 columns but 2 value were supplied
end;

I have an error at last line, what is wrong in my code ?

Thanks

AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

Re: VirtualQuery - BLOB

Post by AlainANTOCI » Tue 04 Oct 2022 08:33

Hi,

Any news for my last post, I've try with unidac 9.3 I have the same problem. I Use delphi XE8 and Oracle 19, I've try with normal and direct mode, the problem still occur.

Thanks

AlainANTOCI
Posts: 21
Joined: Wed 07 Apr 2021 07:48

Re: VirtualQuery - BLOB

Post by AlainANTOCI » Tue 18 Oct 2022 12:47

Hi

An other try with posgres

Only change create :

CREATE TABLE TEST (ID VARCHAR(1),BTEXT BYTEA)

It Work

But I need it to work with Oracle.

Could you help please.

Post Reply