Search found 21 matches

by AlainANTOCI
Tue 18 Oct 2022 12:47
Forum: VirtualDAC
Topic: VirtualQuery - BLOB
Replies: 6
Views: 48294

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.
by AlainANTOCI
Tue 04 Oct 2022 08:33
Forum: VirtualDAC
Topic: VirtualQuery - BLOB
Replies: 6
Views: 48294

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
by AlainANTOCI
Wed 18 May 2022 08:41
Forum: VirtualDAC
Topic: VirtualQuery - BLOB
Replies: 6
Views: 48294

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
by AlainANTOCI
Fri 06 May 2022 07:14
Forum: VirtualDAC
Topic: VirtualQuery - BLOB
Replies: 6
Views: 48294

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.
by AlainANTOCI
Mon 02 May 2022 09:40
Forum: VirtualDAC
Topic: VirtualDac - assertin failure
Replies: 2
Views: 8580

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.
by AlainANTOCI
Mon 02 May 2022 09:36
Forum: VirtualDAC
Topic: VirtualQuery - BLOB
Replies: 6
Views: 48294

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
by AlainANTOCI
Wed 20 Apr 2022 14:42
Forum: VirtualDAC
Topic: VirtualDac - assertin failure
Replies: 2
Views: 8580

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,
by AlainANTOCI
Thu 17 Mar 2022 16:39
Forum: VirtualDAC
Topic: Memo and DBGrid
Replies: 2
Views: 9510

Re: Memo and DBGrid

Nice !!

It work fine.
by AlainANTOCI
Thu 17 Mar 2022 13:00
Forum: VirtualDAC
Topic: Memo and DBGrid
Replies: 2
Views: 9510

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
by AlainANTOCI
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.
by AlainANTOCI
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
by AlainANTOCI
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.
by AlainANTOCI
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
by AlainANTOCI
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,
by AlainANTOCI
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