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.
Search found 21 matches
- Tue 18 Oct 2022 12:47
- Forum: VirtualDAC
- Topic: VirtualQuery - BLOB
- Replies: 6
- Views: 48330
- Tue 04 Oct 2022 08:33
- Forum: VirtualDAC
- Topic: VirtualQuery - BLOB
- Replies: 6
- Views: 48330
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
- Wed 18 May 2022 08:41
- Forum: VirtualDAC
- Topic: VirtualQuery - BLOB
- Replies: 6
- Views: 48330
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
- Fri 06 May 2022 07:14
- Forum: VirtualDAC
- Topic: VirtualQuery - BLOB
- Replies: 6
- Views: 48330
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.
- Mon 02 May 2022 09:40
- Forum: VirtualDAC
- Topic: VirtualDac - assertin failure
- Replies: 2
- Views: 8585
Re: VirtualDac - assertin failure
I found a way to solve my problem, i remove the vitrual query on the form, the I dynamicaly create then destroy a virtual query if I need one.
- Mon 02 May 2022 09:36
- Forum: VirtualDAC
- Topic: VirtualQuery - BLOB
- Replies: 6
- Views: 48330
VirtualQuery - BLOB
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
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
- Wed 20 Apr 2022 14:42
- Forum: VirtualDAC
- Topic: VirtualDac - assertin failure
- Replies: 2
- Views: 8585
VirtualDac - assertin failure
Hi,
I try to convert my code and remove temporary table by virtualDAC.
I use last version 9.2.1. I have a problem with batch and previous version it s now fixed, thanks. but now I have the message :
Le projet MSat4.exe a déclenché la classe d'exception EAssertionFailed avec le message 'Assertion failure (d:\projectsClone1\Delphi\Dac\Common\Source\MemData.pas, ligne 7852)'
Any ideas ?
Regards,
I try to convert my code and remove temporary table by virtualDAC.
I use last version 9.2.1. I have a problem with batch and previous version it s now fixed, thanks. but now I have the message :
Le projet MSat4.exe a déclenché la classe d'exception EAssertionFailed avec le message 'Assertion failure (d:\projectsClone1\Delphi\Dac\Common\Source\MemData.pas, ligne 7852)'
Any ideas ?
Regards,
- Thu 17 Mar 2022 16:39
- Forum: VirtualDAC
- Topic: Memo and DBGrid
- Replies: 2
- Views: 9517
Re: Memo and DBGrid
Nice !!
It work fine.
It work fine.
- Thu 17 Mar 2022 13:00
- Forum: VirtualDAC
- Topic: Memo and DBGrid
- Replies: 2
- Views: 9517
Memo and DBGrid
Hi,
I use some DBGrid to show memos field.
If I done this :
SELECT CAST(SUBSTR(My_memo,0,255) AS VARCHAR2(255)) AS My_Memo_txt FROM My_table
It works with TUniQuery but with TVirtualQuery the only thing I have in my DBGrid is '(memo)'.
Is there anything to do with VirtualQuery, for now I use calculated field but if you have another solution.
Regards
I use some DBGrid to show memos field.
If I done this :
SELECT CAST(SUBSTR(My_memo,0,255) AS VARCHAR2(255)) AS My_Memo_txt FROM My_table
It works with TUniQuery but with TVirtualQuery the only thing I have in my DBGrid is '(memo)'.
Is there anything to do with VirtualQuery, for now I use calculated field but if you have another solution.
Regards
- Thu 20 Jan 2022 09:08
- Forum: Universal Data Access Components
- Topic: Unidac - Oracle - Batch
- Replies: 7
- Views: 5031
Re: Unidac - Oracle - Batch
Hi,
I finally found the solution !
In the registry look at the keys under\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE you will have values like KEY_OraClientXXX in my case KEY_OraClient19Home2_32bit.
In the values you need to have a string value name NLS_LANG with values FRENCH_FRANCE.WE8MSWIN1252 in my case (FRENCH_FRANCE.WE8ISO8859P15 also work).
Some of my client haven't this information and french caracter like accented or special character do not display correctly and my query return wrong result.
Last question, before unidac I use ADO and I haven't to check this values in registry is there anything I can do instead of add this values in registry ?
Hope it will help other users.
I finally found the solution !
In the registry look at the keys under\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE you will have values like KEY_OraClientXXX in my case KEY_OraClient19Home2_32bit.
In the values you need to have a string value name NLS_LANG with values FRENCH_FRANCE.WE8MSWIN1252 in my case (FRENCH_FRANCE.WE8ISO8859P15 also work).
Some of my client haven't this information and french caracter like accented or special character do not display correctly and my query return wrong result.
Last question, before unidac I use ADO and I haven't to check this values in registry is there anything I can do instead of add this values in registry ?
Hope it will help other users.
- Thu 16 Dec 2021 09:53
- Forum: Universal Data Access Components
- Topic: VirtualQuery + Batch
- Replies: 2
- Views: 7238
Re: VirtualQuery + Batch
a simple code to reproduce the problem :
procedure TFichePrincipale.Button1Click(Sender: TObject);
var
TQ: TVirtualQuery;
RQ: TVirtualTable;
I: Integer;
begin
RQ := TVirtualTable.Create(nil);
try
RQ.AddField('USER_ID',ftInteger,0);
TQ := TVirtualQuery.Create(nil);
try
TQ.SourceDataSets.Add(RQ,'','P_EXPORT_DATA');
TQ.Sql.Text := 'INSERT INTO P_EXPORT_DATA (USER_ID) VALUES (:USER_ID)';
TQ.Params[0].DataType := ftInteger;
TQ.Params.ValueCount := 10; //---- Line in error
for I := 0 to 9 do
TQ.Params[0] .AsInteger := I + 1;
TQ.Execute(10);
finally
FreeAndNil(TQ);
end;
finally
FreeAndNil(RQ);
end;
end;
Compilation is ok, I use Delphi XE8, Oracle and Unidac 9.1.1 in a 32 bits project.
Regards
procedure TFichePrincipale.Button1Click(Sender: TObject);
var
TQ: TVirtualQuery;
RQ: TVirtualTable;
I: Integer;
begin
RQ := TVirtualTable.Create(nil);
try
RQ.AddField('USER_ID',ftInteger,0);
TQ := TVirtualQuery.Create(nil);
try
TQ.SourceDataSets.Add(RQ,'','P_EXPORT_DATA');
TQ.Sql.Text := 'INSERT INTO P_EXPORT_DATA (USER_ID) VALUES (:USER_ID)';
TQ.Params[0].DataType := ftInteger;
TQ.Params.ValueCount := 10; //---- Line in error
for I := 0 to 9 do
TQ.Params[0] .AsInteger := I + 1;
TQ.Execute(10);
finally
FreeAndNil(TQ);
end;
finally
FreeAndNil(RQ);
end;
end;
Compilation is ok, I use Delphi XE8, Oracle and Unidac 9.1.1 in a 32 bits project.
Regards
- Sat 11 Dec 2021 07:05
- Forum: Universal Data Access Components
- Topic: VirtualQuery + Batch
- Replies: 2
- Views: 7238
VirtualQuery + Batch
Hi,
Is it possible to use batch with virutualTable. I've made the test below :
var
I: Integer;
begin
//---- Sql : Insert
VQ.Sql.Text := 'INSERT INTO P_EXPORT_DATA (USER_ID) VALUES (:USER_ID)';
VQ.Params[0].DataType := ftInteger;
//---- Par bloc de MAX_BATCH
VQ.Params.ValueCount := MAX_BATCH;
for I := 1 to 100 do
VQ.Params[0].AsInteger := I;
VQ.Execute(100,0);
end;
P_EXPORT_DATA VirtualTable with only on field Integer
VQ VirutalQuery
Line in bold throw exception :
Le projet MSat4.exe a déclenché la classe d'exeception EAssertionFailed avec le Message 'Muse be overrided (D:\projectsClone1\Delphi\Dac\Common\source\dbaccess.pas, ligne 3953)
The rest of code seems to works.
The same code with real table and UniQuery Works
I Use delphi XE 8 et Unidac 9.1.1. Projects are on drive D: but directory I've no directory called ProjectsClone1.
Regards.
Is it possible to use batch with virutualTable. I've made the test below :
var
I: Integer;
begin
//---- Sql : Insert
VQ.Sql.Text := 'INSERT INTO P_EXPORT_DATA (USER_ID) VALUES (:USER_ID)';
VQ.Params[0].DataType := ftInteger;
//---- Par bloc de MAX_BATCH
VQ.Params.ValueCount := MAX_BATCH;
for I := 1 to 100 do
VQ.Params[0].AsInteger := I;
VQ.Execute(100,0);
end;
P_EXPORT_DATA VirtualTable with only on field Integer
VQ VirutalQuery
Line in bold throw exception :
Le projet MSat4.exe a déclenché la classe d'exeception EAssertionFailed avec le Message 'Muse be overrided (D:\projectsClone1\Delphi\Dac\Common\source\dbaccess.pas, ligne 3953)
The rest of code seems to works.
The same code with real table and UniQuery Works
I Use delphi XE 8 et Unidac 9.1.1. Projects are on drive D: but directory I've no directory called ProjectsClone1.
Regards.
- Fri 29 Oct 2021 14:24
- Forum: Universal Data Access Components
- Topic: Unidac 32/64 Bits
- Replies: 3
- Views: 1342
Re: Unidac 32/64 Bits
Thanks,
I've no problem to use ADO (64 Bits). The only problem is install of access engine 64 Bits need to uninstall 32 bits office already installed and for some of my client is not possible.
Regards
I've no problem to use ADO (64 Bits). The only problem is install of access engine 64 Bits need to uninstall 32 bits office already installed and for some of my client is not possible.
Regards
- Thu 28 Oct 2021 07:15
- Forum: Universal Data Access Components
- Topic: Unidac 32/64 Bits
- Replies: 3
- Views: 1342
Unidac 32/64 Bits
Hi,
I need to transfert data from access 97 (.mdb) to Postgres. I've made it with batch it work fine but to do that I need to install 64 engine of MS Access. Is there a solution in a 64 bits project of delphi to use unidac connection to postgres in 64 bits and ms access (ADO) in 32 bits ?
Regards,
I need to transfert data from access 97 (.mdb) to Postgres. I've made it with batch it work fine but to do that I need to install 64 engine of MS Access. Is there a solution in a 64 bits project of delphi to use unidac connection to postgres in 64 bits and ms access (ADO) in 32 bits ?
Regards,
- Wed 13 Oct 2021 09:27
- Forum: Universal Data Access Components
- Topic: Unidac - Oracle - Batch
- Replies: 7
- Views: 5031
Re: Unidac - Oracle - Batch
Hi,
I've try on my own sever with charset WE8MSWIN1252 (Default) and WE8ISO8859P15 (wich is the one of some of my clients installation) both work for me.
For connection I use a TUniConnection component with connection string like : 'Provider Name=Oracle;Data Source=Name_From_tnsname.ora;User ID=User_Name;Password=User_Password;Login Prompt=False'
I don't use any Unicode property in TUniconnection.
I havent find the difference between my configuration and clients configuration (my oracle server is microsoft, clients can be microsoft or linux, some work and some not)
I there anything i can test to identify the difference ?
Regards
I've try on my own sever with charset WE8MSWIN1252 (Default) and WE8ISO8859P15 (wich is the one of some of my clients installation) both work for me.
For connection I use a TUniConnection component with connection string like : 'Provider Name=Oracle;Data Source=Name_From_tnsname.ora;User ID=User_Name;Password=User_Password;Login Prompt=False'
I don't use any Unicode property in TUniconnection.
I havent find the difference between my configuration and clients configuration (my oracle server is microsoft, clients can be microsoft or linux, some work and some not)
I there anything i can test to identify the difference ?
Regards