Search found 3342 matches

by ViktorV
Fri 22 Oct 2021 16:02
Forum: MySQL Data Access Components
Topic: How to get the last Sql statement?
Replies: 1
Views: 11899

Re: How to get the last Sql statement?

Hi there!

Thank you for contacting Devart and for your question!

Please note that MyDAC does not contain a similar property or method.

But you can try to implement this functionality yourself using the following tips:

- You can organize independent logging of all requests you perform in any way convenient for you.

- Or take advantage of MySQL's ability to log:

1. Execute SET GLOBAL log_output = 'TABLE';
2. Execute SET GLOBAL general_log = 'ON';
3. Take a look at the table mysql.general_log. Например:

Code: Select all

SELECT * FROM mysql.general_log WHERE command_type ='Query' ORDER BY event_time DESC 
Note, estarting the server leaves you where you started (log is by default still off).
For more information, see http://dev.mysql.com/doc/refman/5.1/en/ ... eneral_log

Please, let us know if you have any questions!
by ViktorV
Thu 21 Oct 2021 15:18
Forum: Universal Data Access Components
Topic: TUniScript doesn't use Transaction that was set in property Transaction and starts new Transaction
Replies: 3
Views: 1244

Re: TUniScript doesn't use Transaction that was set in property Transaction and starts new Transaction

Kindly note that how it is specified in the https://www.devart.com/unidac/docs/using-interbase.htm there is a property called AutoDLL - for the resolution is should be set to False.
However, we have found out that it doesn't work as it is intended to.
We have already fixed this unfortunate situation on our end. Now the AutoDLL property will be set to be False and you will get the required behavior for your task. The additional transaction won't be created either.
This fix will be added to the next build of our product and will be available to all clients.
by ViktorV
Thu 21 Oct 2021 15:17
Forum: InterBase Data Access Components
Topic: Questions on IBDAC 8.0.1 and Firebird 4.0
Replies: 19
Views: 47935

Re: Questions on IBDAC 8.0.1 and Firebird 4.0

Kindly note that you are going to always get this error message while using the Firebird 2.5 library because it doesn't support the required functionality.
Please specify the exact client library your application is using while receiving the error.
To retrieve the name and the path to the library loaded automatically, you can use a third-party utility, e.g. Process Explorer. In case it is not the Firebird 4 library please feel free to provide us with it.
by ViktorV
Thu 21 Oct 2021 15:14
Forum: Universal Data Access Components
Topic: unidac_9.0.1 TCRVioSocket access violation in thread trying to connect to nonexistent IP second time
Replies: 2
Views: 1339

Re: unidac_9.0.1 TCRVioSocket access violation in thread trying to connect to nonexistent IP second time

Thank you for letting us know about this unfortunate situation. We would like to inform you that we have successfully reproduced this issue and at the moment our team is investigating it. I would like to kindly assure you that as soon as we have any results, we will immediately let you know.
by ViktorV
Thu 07 Oct 2021 14:14
Forum: Universal Data Access Components
Topic: UniDAC change values of TUniQuery.Params
Replies: 10
Views: 5934

Re: UniDAC change values of TUniQuery.Params

Hi Fred,

Unfortunately, we missed to reproduce the described behavior.

I fully understand that this reply may sound like a generic one but in order to fix the issue, we need to reproduce it in our environment. The fastest way is to make this is when we can receive a small sample with queries, because the issue may be in DDL tables (which we try to create and field types may be different on your and our sides), or in project or component settings.

Best regards,
Viktor
by ViktorV
Fri 01 Oct 2021 15:57
Forum: InterBase Data Access Components
Topic: Questions on IBDAC 8.0.1 and Firebird 4.0
Replies: 19
Views: 47935

Re: Questions on IBDAC 8.0.1 and Firebird 4.0

Hi!

Unfortunately, we were unable to reproduce the behavior you indicated in our environment based on the data you provided - we connected to the server without any issues.
Therefore, please compose us a complete sample demonstrating the behavior you specified and send us all the server files and specify how you run it, like a server or a regular file.

Thanks in advance,
Viktor
by ViktorV
Fri 01 Oct 2021 15:55
Forum: Universal Data Access Components
Topic: Connection pooling setup
Replies: 44
Views: 20813

Re: Connection pooling setup

Hi André!

Thank you for your question and interest in our product!

Note, the PoolingOptions.MinPoolSize option is not the minimum number of used connections in the pool (any number of connections that do not exceed the PoolingOptions.MaxPoolSize value can be used in the pool). We will add this clarification to the UniDAC help.
PoolingOptions.MinPoolSize is the maximum number of unused connections that will remain during the pool cleanup procedure. That is, when the pool cleanup procedure is performed and when the number of unused connections exceeds MinPoolSize, the extra ones are closed until the number of unused connections grows early or less than MinPoolSize.

Should you have any questions, do not hesitate to ask!

Thanks in advance,
Viktor
by ViktorV
Thu 30 Sep 2021 09:21
Forum: Universal Data Access Components
Topic: Connection pooling setup
Replies: 44
Views: 20813

Re: Connection pooling setup

Hi André!

Thank you for contacting Devart and for your inquiry!

We do apologize for the slight delay in our response! We carefully examined your sample and came to the following results:
The sample you sent does not demonstrate the bug you specified in the work of our pulling. The reason for this filling of ListBoxes is in the order of thread starts.
If you display in the ListBox not only information that the connection is open, but also information about the start of the thread, you will see that the threads from the second cycle are launched 1-2 seconds later than the first, respectively, and connections are first opened in the first cycle and with some delay in the second.
You can use your example code slightly modified by us.

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var
  LPooling: string;
begin
  Button1.Enabled := False;
  Button1.Caption := 'Running..';

  TTask.Run(
    procedure
    var
      LIndex: Integer;
      LStopWatch: TStopWatch;
      LTasks: TArray<ITask>;
      LConnection: TUniConnection;
    begin
      LConnection := TUniConnection.Create(nil);
      LConnection.ConnectString := 'Provider Name=mySQL;Database=sakila;User ID=admin;Password=Teste_1234;Connection Timeout=15;Data Source=10.211.55.13;Port=3306';
      LConnection.LoginPrompt := False;
      LConnection.PoolingOptions.MaxPoolSize := 4;
      LConnection.PoolingOptions.MinPoolSize := 4;

      LConnection.PoolingOptions.ConnectionLifetime := 5000;

      LConnection.PoolingOptions.Validate := True;
      LConnection.Pooling := True;
      //LConnection.Open;
      //LConnection.Close; // Some caching should happen !!!
      //LConnection.Open; // Open before timing starts
      LStopWatch := TStopWatch.StartNew;
      LTasks := [];
      for LIndex := 1 to 100 do
      begin
         LTasks := LTasks + [TTask.Run(
          procedure
          var
            LLConnection: TUniConnection;
            LQuery: TUniQuery;
            j: Integer;
          begin
            j := TTask.CurrentTask.Id;

            TThread.Synchronize(nil, procedure
                                        begin
                                          listbox1.items.add('Started: ' + IntToStR(j));
                                          listbox1.update;
                                          ListBox1.ItemIndex := ListBox1.Items.Count - 1;
                                        end);

            LLConnection := TUniConnection.Create(nil, LConnection.ConnectString);
            LLConnection.Open;
            try
              LQuery := TUniQuery.Create(nil);
              try
                LQuery.Connection := LLConnection;
                LQuery.SQL.Text := 'select  * from customer';

                  TThread.Synchronize(nil, procedure
                                              begin
                                                listbox1.items.add('Connected: ' + IntToStR(j));
                                                listbox1.update;
                                                ListBox1.ItemIndex := ListBox1.Items.Count - 1;
                                              end);
                  LQuery.Open;
                  LQuery.Last;
                  sleep(300);
                  LQuery.Close;
                  TThread.Synchronize(nil, procedure
                                              begin
                                                listbox1.items.delete(listbox1.items.IndexOf('Started: ' + IntToStR(j)));
                                                listbox1.items.delete(listbox1.items.IndexOf('Connected: ' + IntToStR(j)));
                                                listbox1.update;
                                                listbox2.ItemIndex := listbox2.Items.Count - 1;
                                              end);
              finally
                FreeAndNil(LQuery);
              end;
            finally
              LLConnection.Close;
              FreeAndNil(LLConnection);
            end;
          end)];

      end;
      TTask.WaitForAll(LTasks);
      LConnection.Close;
      FreeAndNil(LConnection);
      LStopWatch.Stop;
      TThread.Synchronize(nil,
        procedure
        begin
          Memo1.Lines.Add('MYSQL 1 - '+LPooling + LStopWatch.Elapsed.ToString());
        end);
    end);

  TTask.Run(
    procedure
    var
      LIndex: Integer;
      LStopWatch: TStopWatch;
      LTasks: TArray<ITask>;
      LConnection: TUniConnection;
    begin
      LConnection := TUniConnection.Create(nil);
      LConnection.ConnectString := 'Provider Name=mySQL;Database=sakila;User ID=admin;Password=Teste_1234;Connection Timeout=15;Data Source=10.211.55.13;Port=3306';
      LConnection.LoginPrompt := False;
      LConnection.PoolingOptions.MaxPoolSize := 4;
      LConnection.PoolingOptions.MinPoolSize := 4;

      //DIFFERENT VALUE, NEW CONNECTION POOL USED
      LConnection.PoolingOptions.ConnectionLifetime := 6000;

      LConnection.PoolingOptions.Validate := True;
      LConnection.Pooling := True;
      //LConnection.Open;
      //LConnection.Close; // Some caching should happen !!!
      //LConnection.Open; // Open before timing starts
      LStopWatch := TStopWatch.StartNew;
      LTasks := [];
      for LIndex := 1 to 100 do
      begin
        LTasks := LTasks + [TTask.Run(
          procedure
          var
            LLConnection: TUniConnection;
            LQuery: TUniQuery;
            j: Integer;
          begin
            j := TTask.CurrentTask.Id;

            TThread.Synchronize(nil, procedure
                                        begin
                                          listbox2.items.add('Started: ' + IntToStR(j));
                                          listbox2.update;
                                          listbox2.ItemIndex := listbox2.Items.Count - 1;
                                        end);

            LLConnection := TUniConnection.Create(nil, LConnection.ConnectString);
            LLConnection.Open;
            try
              LQuery := TUniQuery.Create(nil);
              try
                LQuery.Connection := LLConnection;
                LQuery.SQL.Text := 'select  * from customer';

                  TThread.Synchronize(nil, procedure
                                              begin
                                                 listbox2.items.add('Connected: ' + IntToStR(j));
                                                 listbox2.update;
                                                 listbox2.ItemIndex := listbox2.Items.Count - 1;
                                              end);
                  LQuery.Open;
                  LQuery.Last;
                  sleep(300);
                  LQuery.Close;
                  TThread.Synchronize(nil, procedure
                                              begin
                                                listbox2.items.delete(listbox2.items.IndexOf('Started: ' + IntToStR(j)));
                                                listbox2.items.delete(listbox2.items.IndexOf('Connected: ' + IntToStR(j)));
                                                listbox2.update;
                                                listbox2.ItemIndex := listbox2.Items.Count - 1;
                                              end);

              finally
                FreeAndNil(LQuery);
              end;
            finally
              LLConnection.Close;
              FreeAndNil(LLConnection);
            end;
          end)];

      end;
      TTask.WaitForAll(LTasks);
      LConnection.Close;
      FreeAndNil(LConnection);
      LStopWatch.Stop;
      TThread.Synchronize(nil,
        procedure
        begin
          Memo1.Lines.Add('MYSQL 2 - '+LPooling + LStopWatch.Elapsed.ToString());
        end);
    end);

end;
Then you will see that there are times when 4 connections are open in both the first and second threads at the same time (see screenshot).
Image

Also, you can use the TUniSQLMonitor component to get information about the work of our connection pools. To do this, just place this component on the form and set tfPool in the TraceFlag enumeration (see screenshot).
Image
Then you should launch TUniSQLMonitor, for this you just need to click on it twice, and then launch your application and click Button1. You will see identical and correct behavior for both pools.

We will consider the possibility of adding Id to PoolingOptions so that to create two independent pools you do not have to look for wordaround of job type of different ConnectionLifetime.

Please, let us know if you have any questions!

Thanks in advance,
Viktor
by ViktorV
Fri 24 Sep 2021 14:43
Forum: InterBase Data Access Components
Topic: Does IBDAC 8 support Firebird 4 batch execution?
Replies: 6
Views: 53000

Re: Does IBDAC 8 support Firebird 4 batch execution?

Hi!

Thank you for your request!

This support is not available in this poduct version. But we plan to add it in the next IBDAC release.
Should you have any other questions, do not hesitate to ask!

Thanks in advance,
Viktor
by ViktorV
Fri 24 Sep 2021 14:16
Forum: InterBase Data Access Components
Topic: Error with IBDAC Version 7.4.4: String Right Truncation
Replies: 9
Views: 10378

Re: Error with IBDAC Version 7.4.4: String Right Truncation

Hi!

Thank you for your question and interest in our product!
Note that when using the DescribeParams property: https://www.devart.com/ibdac/docs/devar ... params.htm
the required data about the parameter (length, type, subtype, etc.) is obtained and used.
Feel free to ask in case of any further questions!

Thanks in advance,
Viktor
by ViktorV
Fri 24 Sep 2021 14:12
Forum: MySQL Data Access Components
Topic: Problems with Batch Updates in 10.4.3
Replies: 18
Views: 81057

Re: Problems with Batch Updates in 10.4.3

Hi Tobias,

Not good... In this case we need a sampe which reproduces the issue on permanent basis.

Since you are the first person who reported this we need to perform more testing in order to identify the issue- because all previous tests we performed could not reproduce the issue on our side and without a sample from your side we will not be able to locate it. .

Thanks in advance,
Viktor
by ViktorV
Wed 22 Sep 2021 16:44
Forum: Universal Data Access Components
Topic: UniDAC change values of TUniQuery.Params
Replies: 10
Views: 5934

Re: UniDAC change values of TUniQuery.Params

Hi there,

Thank you for contacting Devart and for your inquiry!

Unfortunately, we were unable to reproduce the issue in our environment based on the information you provided. So, in order to investigate the issue and find an appropriate solution faster, please send us a complete sample which will stably reproduce the issue in our environment.
Please try to create a sample demonstrating the behavior you specified, including scripts to create and populate database data and send it to us for review using our contact form:
https://devart.com/company/contactform.html

Should you have any questions, do not hesitate to ask!

Best regards,
Viktor
by ViktorV
Wed 22 Sep 2021 16:41
Forum: InterBase Data Access Components
Topic: Questions on IBDAC 8.0.1 and Firebird 4.0
Replies: 19
Views: 47935

Re: Questions on IBDAC 8.0.1 and Firebird 4.0

Hi!

Thank you for your inquiry!
1) This error means that the client library cannot load the required ChaCha plugin. Please try to specify the full path to the client library file in the CliebtLibrary field, so that the Plugins folder with the plugin file was also present there. Pay attention, all these files must have a bitness equal to the bitness of your application.
If this does not help in solving the issue, please send us your sample with the necessary files. And the firebird.conf file from your server.
2) In IBDAC 8.0.1 for Firebird 4, we supported INT128, DECFLOAT and large NUMERIC types, as well as table names up to 64 characters.
The TIMESTAMP WITH TIME ZONE type is supported as a string in this release.
Full support of this type will be added to the next release of IBDAC!
We will consider the possibility of supporting isc_dpb_set_bind DPB.
Should you have any questions, do not hesitate to ask!

Best regards,
Viktor
by ViktorV
Wed 22 Sep 2021 16:38
Forum: Universal Data Access Components
Topic: Firebird 4 Release
Replies: 4
Views: 3212

Re: Firebird 4 Release

Hi Leonard!

Please note that we have already released UniDAC 9.0.1 and IBDAC 8.0.1 with Firebird 4 support: we supported INT128, DECFLOAT and large NUMERIC types, as well as table names up to 64 characters.
The TIMESTAMP WITH TIME ZONE type is supported as a string in this release.
The full support of this type will be in the next release of IBDAC!
Should you have any questions, do not hesitate to ask!

Best regards,
Viktor
by ViktorV
Tue 21 Sep 2021 10:37
Forum: InterBase Data Access Components
Topic: Firebird 3 DB CharSet UTF8 UseUnicode does' nt work
Replies: 7
Views: 16486

Re: Firebird 3 DB CharSet UTF8 UseUnicode does' nt work

Hi Frank,

Thank you for the info provided!
We have successfully reproduced the issue and at the moment our team is investigating it.
Please, rest assured that as soon as we have any results, we will immediately let you know.
Please, let us know if you have any additional questions or need any kind of additional instructions!

Best regards,
Viktor