Page 1 of 1
VirtualQuery - BLOB
Posted: Mon 02 May 2022 09:36
by AlainANTOCI
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
Re: VirtualQuery - BLOB
Posted: Thu 05 May 2022 18:45
by MaximG
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
Re: VirtualQuery - BLOB
Posted: Fri 06 May 2022 07:14
by AlainANTOCI
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.
Re: VirtualQuery - BLOB
Posted: Fri 06 May 2022 12:34
by MaximG
Thank you for the information. We will investigate the described issue and let you know the results shortly.
Re: VirtualQuery - BLOB
Posted: Wed 18 May 2022 08:41
by AlainANTOCI
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
Re: VirtualQuery - BLOB
Posted: Tue 04 Oct 2022 08:33
by AlainANTOCI
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
Re: VirtualQuery - BLOB
Posted: Tue 18 Oct 2022 12:47
by AlainANTOCI
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.