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
VirtualQuery - BLOB
Re: VirtualQuery - BLOB
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
-
- Posts: 21
- Joined: Wed 07 Apr 2021 07:48
Re: VirtualQuery - BLOB
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.
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
Thank you for the information. We will investigate the described issue and let you know the results shortly.
-
- Posts: 21
- Joined: Wed 07 Apr 2021 07:48
Re: VirtualQuery - BLOB
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
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
-
- Posts: 21
- Joined: Wed 07 Apr 2021 07:48
Re: VirtualQuery - BLOB
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
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
-
- Posts: 21
- Joined: Wed 07 Apr 2021 07:48
Re: VirtualQuery - BLOB
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.
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.