TIBCConnection.DatabaseInfo faulty results with Unicode
TIBCConnection.DatabaseInfo faulty results with Unicode
Hi,
If you turn ON UseUnicode on TIBCConnection.Options, the DatabaseInfo results are potentially wrong.
I have tested this with Delphi 2009 and Delphi 7 (UseUnicode = False) on both, and they return the same results. Yet, when I use UseUnicode = True on Delphi 2009, I get different results (same for D7, btw).
However, this doesn't happen on all queries! I had a database and query from a customer in order to reproduce this.
Can you check the code? Using UseUnicode = True makes the results faulty.
With regards,
Martijn Tonies
Upscene Productions
If you turn ON UseUnicode on TIBCConnection.Options, the DatabaseInfo results are potentially wrong.
I have tested this with Delphi 2009 and Delphi 7 (UseUnicode = False) on both, and they return the same results. Yet, when I use UseUnicode = True on Delphi 2009, I get different results (same for D7, btw).
However, this doesn't happen on all queries! I had a database and query from a customer in order to reproduce this.
Can you check the code? Using UseUnicode = True makes the results faulty.
With regards,
Martijn Tonies
Upscene Productions
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
Using the latest IBDac, the properties on Indexed Reads and so on don't return the correct values -> I compared these with IBObjects. Also, given the number of rows in the tables, these values were simply too small.Dimon wrote:We still can not reproduce the problem. Please specify the IBDAC version you are using and property that returns a wrong result.
Any progress on this yet?upscene wrote:Using the latest IBDac, the properties on Indexed Reads and so on don't return the correct values -> I compared these with IBObjects. Also, given the number of rows in the tables, these values were simply too small.Dimon wrote:We still can not reproduce the problem. Please specify the IBDAC version you are using and property that returns a wrong result.
With version 3.10.11, UseUnicode doesn't seem to make a difference.Dimon wrote:Unfortunately we could not reproduce the problem.
Please send me sample database objects you are using and Delphi code to get DatabaseInfo.
Here's what I found out:
I got a query from a customer which has the following statistics:
Code: Select all
+--------------------------+-----------+-----------+-------------+---------+---------+---------+
| Table Name | Records | Indexed | Non-Indexed | Updates | Deletes | Inserts |
| | Total | reads | reads | | | |
+--------------------------+-----------+-----------+-------------+---------+---------+---------+
| CRM_CLIENT_CLIENT_GROUP| 1717 | 149718 | 0 | 0 | 0 | 0 |
| CRM_DELIVERY_POINT| 5172 | 138859 | 0 | 0 | 0 | 0 |
| PAYMENT| 169100 | 149782 | 0 | 0 | 0 | 0 |
| STORAGE_ARTICLE| 4075 | 199812 | 0 | 0 | 0 | 0 |
| STORAGE_CLIENT_SHIPPINGS| 23546 | 138859 | 0 | 0 | 0 | 0 |
| STORAGE_CLIENT_STORES| 5172 | 138859 | 0 | 0 | 0 | 0 |
| STORAGE_SHEET| 52366 | 51505 | 0 | 0 | 0 | 0 |
| STORAGE_SHEET_DETAILS| 205722 | 199830 | 0 | 0 | 0 | 0 |
+--------------------------+-----------+-----------+-------------+---------+---------+---------+
I got more values: $24916, in IBDac: $4916 / $30C84, in IBDac: $0C84.
You see the pattern? Shouldn't these be INT32 or INT64 values? It seems you're not fetching enough bytes (only 2!) for the values.
Does this help?
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
I have filled table with 1 mln records and created a select statement with cross join. I have executed and fetched this statement and checked the DatabaseInfo.Reads parameter. It gave 130000. The same value I saw in IBConsole. I had the same value in Delphi 7 and Delphi 2009 regardless the Unicode option.
Here is the information from the Info page of the TIBCConnection editor:
Can try the same test with IBX components? You can check the length of this parameter in the TIBDatabaseInfo.GetLongDatabaseInfo method (the IBDatabaseInfo unit).
Here is the information from the Info page of the TIBCConnection editor:
Code: Select all
Server Version: WI-V9.0.3.437
Client Version: 9.0
ODS Version: 13.1
Client Library: D:\Program Files\InterBase\bin\gds32.dll
Database SQL Dialect: 3
Instead of components, I decided to try with a trial version of IBExpert
The above statistics come from IBExpert and are the same as my application with IBObjects, but different with IBDac.
This was tested on Firebird (version: WI-V6.3.1.17910 Firebird 2.1), ODS 11.1 database, charset WIN1251, pagesize 8192.
The above statistics come from IBExpert and are the same as my application with IBObjects, but different with IBDac.
This was tested on Firebird (version: WI-V6.3.1.17910 Firebird 2.1), ODS 11.1 database, charset WIN1251, pagesize 8192.
Any news?Challenger wrote:I have filled table with 1 mln records and created a select statement with cross join. I have executed and fetched this statement and checked the DatabaseInfo.Reads parameter. It gave 130000. The same value I saw in IBConsole. I had the same value in Delphi 7 and Delphi 2009 regardless the Unicode option.
Here is the information from the Info page of the TIBCConnection editor:Can try the same test with IBX components? You can check the length of this parameter in the TIBDatabaseInfo.GetLongDatabaseInfo method (the IBDatabaseInfo unit).Code: Select all
Server Version: WI-V9.0.3.437 Client Version: 9.0 ODS Version: 13.1 Client Library: D:\Program Files\InterBase\bin\gds32.dll Database SQL Dialect: 3