Hello,
For bug reporting purposes, when an error occurs (using MadExcept) I want to log the last Sql event.
How can I do this? I haven't found anything under TMyConnection or TMySqlMonitor.
Thank you!
Search found 35 matches
- Sun 10 Oct 2021 12:48
- Forum: MySQL Data Access Components
- Topic: How to get the last Sql statement?
- Replies: 1
- Views: 11876
- Wed 09 Jun 2021 11:59
- Forum: MySQL Data Access Components
- Topic: MyDump.BackupToFile terribly slow even with one record
- Replies: 1
- Views: 11837
MyDump.BackupToFile terribly slow even with one record
Hello,
I noticed that MyDump.BackupToFile terribly slow even with one record.
I found out that each time I call MyDump.BackupToFile, in change BackupToFile calls "SHOW TABLE STATUS" which , at a complex database is more than 1 minute!
This means even if I want to save 1 record, the program freezes for more than 1 minute!
I use MyDac 10.4.3 and these settings:
MyDump := TMyDump.Create(nil);
MyDump.Connection := MyForm.Connection;
MyDump.Objects := [doData];
MyDump.BackupToFile(MyFileName,'select * from temp_invoice;') ;
Thank you for your reply!
I noticed that MyDump.BackupToFile terribly slow even with one record.
I found out that each time I call MyDump.BackupToFile, in change BackupToFile calls "SHOW TABLE STATUS" which , at a complex database is more than 1 minute!
This means even if I want to save 1 record, the program freezes for more than 1 minute!
I use MyDac 10.4.3 and these settings:
MyDump := TMyDump.Create(nil);
MyDump.Connection := MyForm.Connection;
MyDump.Objects := [doData];
MyDump.BackupToFile(MyFileName,'select * from temp_invoice;') ;
Thank you for your reply!
- Wed 05 May 2021 12:27
- Forum: MySQL Data Access Components
- Topic: "?" characters instead of foreign characters
- Replies: 5
- Views: 5781
Re: "?" characters instead of foreign characters
Hi Viktor,
Thank you for your reply.
I set TMyConnection.Options.Charset property to latin1 and with UseUnicode := True it wasn't good,
... however with the "TMyConnection.Options.Charset=latin1 AND UseUnicode := False" combo, the foreign characters showed properly.
Thank you!
Thank you for your reply.
I set TMyConnection.Options.Charset property to latin1 and with UseUnicode := True it wasn't good,
... however with the "TMyConnection.Options.Charset=latin1 AND UseUnicode := False" combo, the foreign characters showed properly.
Thank you!
- Wed 05 May 2021 10:46
- Forum: MySQL Data Access Components
- Topic: "?" characters instead of foreign characters
- Replies: 5
- Views: 5781
Re: "?" characters instead of foreign characters
Hello Victor,
Unfortunately it didn't solve the problem.
-First, when I set Unicode:= true, I had a lot of "Type mismatch for field 'xxx', expecting: String actual: WideString" kind of messages
-Then I created DataTypeMaps so as not the get the messages above
-Then the result was bad:
-when Unicode:= false, then instead of the respective foreign characters I can see "?"
-but whe Unicode:= true, then instead of the respective foreign characters I can see the English correspondent e.g. instead of "ő" I can see "o", instead of "ű" I can see "u".
The database administrator programs show it correctly. I will create a sample.
Thank you!
Unfortunately it didn't solve the problem.
-First, when I set Unicode:= true, I had a lot of "Type mismatch for field 'xxx', expecting: String actual: WideString" kind of messages
-Then I created DataTypeMaps so as not the get the messages above
-Then the result was bad:
-when Unicode:= false, then instead of the respective foreign characters I can see "?"
-but whe Unicode:= true, then instead of the respective foreign characters I can see the English correspondent e.g. instead of "ő" I can see "o", instead of "ű" I can see "u".
The database administrator programs show it correctly. I will create a sample.
Thank you!
- Wed 05 May 2021 10:21
- Forum: MySQL Data Access Components
- Topic: URGENT PROBLEM : in the new version RefreshQuick error
- Replies: 3
- Views: 3755
Re: URGENT PROBLEM : in the new version RefreshQuick error
Hello Victor,
This works, thank you.
This works, thank you.
- Fri 30 Apr 2021 08:27
- Forum: MySQL Data Access Components
- Topic: "?" characters instead of foreign characters
- Replies: 5
- Views: 5781
"?" characters instead of foreign characters
Hello,
I upgraded MyDac 5 to 10.4.3 and after recompiling my applications, instead of the foreign characters I can see ? character.
For example instead of "ő" I can see "?".
What should I do?
The problem should be clearly with the compontent because I tried it with many grids and the result was the same.
Also, using any database editors like NaviCat show the correct characters.
Thank you for your help!
I upgraded MyDac 5 to 10.4.3 and after recompiling my applications, instead of the foreign characters I can see ? character.
For example instead of "ő" I can see "?".
What should I do?
The problem should be clearly with the compontent because I tried it with many grids and the result was the same.
Also, using any database editors like NaviCat show the correct characters.
Thank you for your help!
- Thu 29 Apr 2021 15:56
- Forum: MySQL Data Access Components
- Topic: URGENT PROBLEM : in the new version RefreshQuick error
- Replies: 3
- Views: 3755
URGENT PROBLEM : in the new version RefreshQuick error
So far I used MyDac 5 and yesterday I installed the newest version.
Thanks to the new version everywhere in all my programs where previously RefreshQuick worked flawlessly now there is an error:
> Timestamp field required
But there is timestamp field!
One example:
Sql:
> Select *,CONCAT_WS('-',INVOICE_PRE,INVOICE_YEAR,INVOICE_NO)Sz_sorszam
> from invoice
>
> order by INVOICE_PRE,INVOICE_YEAR,INVOICE_NO
The Update Sql parts are not filled.
Table structure (fragment):
> CREATE TABLE `invoice` (
> `INVOICE_AUTOINC` int(11) NOT NULL AUTO_INCREMENT,
> `INVOICE_PRE` varchar(20) NOT NULL,
> `INVOICE_YEAR` char(4) NOT NULL,
> `INVOICE_NO` char(10) NOT NULL,
> `INVOICE_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
> `INVOICE_TIPUS` tinyint(4) DEFAULT '0' ,
This is very urgent, this afternoon I needed to produce a new version to a customer but in this circumstances I couldn't do anything, the program is full of error messages.
Thanks to the new version everywhere in all my programs where previously RefreshQuick worked flawlessly now there is an error:
> Timestamp field required
But there is timestamp field!
One example:
Sql:
> Select *,CONCAT_WS('-',INVOICE_PRE,INVOICE_YEAR,INVOICE_NO)Sz_sorszam
> from invoice
>
> order by INVOICE_PRE,INVOICE_YEAR,INVOICE_NO
The Update Sql parts are not filled.
Table structure (fragment):
> CREATE TABLE `invoice` (
> `INVOICE_AUTOINC` int(11) NOT NULL AUTO_INCREMENT,
> `INVOICE_PRE` varchar(20) NOT NULL,
> `INVOICE_YEAR` char(4) NOT NULL,
> `INVOICE_NO` char(10) NOT NULL,
> `INVOICE_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
> `INVOICE_TIPUS` tinyint(4) DEFAULT '0' ,
This is very urgent, this afternoon I needed to produce a new version to a customer but in this circumstances I couldn't do anything, the program is full of error messages.
- Mon 03 Feb 2020 09:47
- Forum: MySQL Data Access Components
- Topic: TMyQuery refresh only one field?
- Replies: 1
- Views: 1652
TMyQuery refresh only one field?
Hi,
I have a TMyQuery, let's say I have 3 fields: id, productName, quantity
Sometimes I need to refresh only the quantity fields because the table is very big.
How is this possible? I can't use the SqlRefresh because I use it for refreshing everything (I need this too, sometimes).
Thank you very much for your help!
I have a TMyQuery, let's say I have 3 fields: id, productName, quantity
Sometimes I need to refresh only the quantity fields because the table is very big.
How is this possible? I can't use the SqlRefresh because I use it for refreshing everything (I need this too, sometimes).
Thank you very much for your help!
- Wed 05 Jun 2019 08:05
- Forum: MySQL Data Access Components
- Topic: MyConnectionConnectionLost - inserts last records when rmReconnect
- Replies: 1
- Views: 4859
MyConnectionConnectionLost - inserts last records when rmReconnect
Hello,
Although I use the following event, the program still inserts last records again at reconnect.
What can I do to prevent it? Thank you!
procedure TAdatForm.MyConnectionConnectionLost(Sender: TObject;
Component: TComponent; ConnLostCause: TConnLostCause;
var RetryMode: TRetryMode);
begin
RetryMode := rmReconnect; // rmReconnect,rmReconnectExecute,rmRaise
end;
Although I use the following event, the program still inserts last records again at reconnect.
What can I do to prevent it? Thank you!
procedure TAdatForm.MyConnectionConnectionLost(Sender: TObject;
Component: TComponent; ConnLostCause: TConnLostCause;
var RetryMode: TRetryMode);
begin
RetryMode := rmReconnect; // rmReconnect,rmReconnectExecute,rmRaise
end;
- Fri 10 May 2019 13:07
- Forum: MySQL Data Access Components
- Topic: TMyQuery "pending freeze"
- Replies: 5
- Views: 5465
Re: TMyQuery "pending freeze"
Thank you!
- Fri 10 May 2019 10:58
- Forum: MySQL Data Access Components
- Topic: TMyQuery "pending freeze"
- Replies: 5
- Views: 5465
Re: TMyQuery "pending freeze"
Hello Victor,
Thank you for the answer.
The problem is that no matter if I would set the timeout for example to 10 seconds because as I wrote before most of the times the queries are very fast, but when occasionally they do this, they will stuck literally forever.
Last time I personally waited 20 minutes and it didn't end.(I needed to kill the program in the task manager)
In the DbMonitor the time is "n/a"
So the real question is : what can cause this problem? Is it a server or client side problem?
Thank you very much!
Thank you for the answer.
The problem is that no matter if I would set the timeout for example to 10 seconds because as I wrote before most of the times the queries are very fast, but when occasionally they do this, they will stuck literally forever.
Last time I personally waited 20 minutes and it didn't end.(I needed to kill the program in the task manager)
In the DbMonitor the time is "n/a"
So the real question is : what can cause this problem? Is it a server or client side problem?
Thank you very much!
- Thu 09 May 2019 11:43
- Forum: MySQL Data Access Components
- Topic: TMyQuery "pending freeze"
- Replies: 5
- Views: 5465
TMyQuery "pending freeze"
Hello,
My program connects to a MySql database using Internet.
Sometimes, a few times a day the program freezes because a simple select causes "pending" state forever.
In the DbMonitor I can see that the same select previously took only 0,032 seconds to finish and later it caused a "forever pending".
I started the program in second instance and that was Ok. What can cause this kind of freezing? Thank you!
My program connects to a MySql database using Internet.
Sometimes, a few times a day the program freezes because a simple select causes "pending" state forever.
In the DbMonitor I can see that the same select previously took only 0,032 seconds to finish and later it caused a "forever pending".
I started the program in second instance and that was Ok. What can cause this kind of freezing? Thank you!
- Fri 15 Feb 2019 15:17
- Forum: SQLite Data Access Components
- Topic: LiteSQLMonitor.OnSql
- Replies: 3
- Views: 6985
Re: LiteSQLMonitor.OnSql
Hi,
Thank you for the answer.
I understand and use LiteSQLMonitor frequently but I don't understand the process, you wrote :
-if the Android program has the LiteSQLMonitor compiled(it has by the way)
-and my customer starts the program on his Android phone 200 km away from me
-then how would I be able to read the errors on his phone?
Thank you!
Thank you for the answer.
I understand and use LiteSQLMonitor frequently but I don't understand the process, you wrote :
-if the Android program has the LiteSQLMonitor compiled(it has by the way)
-and my customer starts the program on his Android phone 200 km away from me
-then how would I be able to read the errors on his phone?
Thank you!
- Tue 12 Feb 2019 09:48
- Forum: SQLite Data Access Components
- Topic: LiteSQLMonitor.OnSql
- Replies: 3
- Views: 6985
LiteSQLMonitor.OnSql
Hello,
My program runs on Android at user side. I need to debug the errors.
I thought that the best way to do it is to write in log file in the event LiteSQLMonitor.OnSql.
However I need to log only the errors.
How can I get only the sql texts with error in the LiteSQLMonitor.OnSql?
Thank you!
My program runs on Android at user side. I need to debug the errors.
I thought that the best way to do it is to write in log file in the event LiteSQLMonitor.OnSql.
However I need to log only the errors.
How can I get only the sql texts with error in the LiteSQLMonitor.OnSql?
Thank you!
- Thu 27 Dec 2018 14:58
- Forum: MySQL Data Access Components
- Topic: TMyQuery : save / load data?
- Replies: 5
- Views: 2230
Re: TMyQuery : save / load data?
Hello Victor,
Thank you for your reply. The link you gave me linked to a "Access violation on Win32 target" topic ...
Thank you
Thank you for your reply. The link you gave me linked to a "Access violation on Win32 target" topic ...
Thank you