Improper result of search byte value in column of character type |
Transer |
2009-11-30 06:22:22 |
Hi!
I trying to find data in character column by byte[] parameter, but result depends on applied values. In general SQL SELECT returns ResultSet with proper row, but for several search values ResultSet is empty. For search values was used data from same table.
Table has a type of FoxPro 2.5 for DOS, versionNumber - "F5", code page - CP866.
JDBC driver - evaluation version of DBF_Embedded_JDBC40.jar (Implementation-Version: 4.2.103 on November 05, 2009, Specification-Title: HXTT DBF JDBC 4.0 Embedded Package For Evaluation).
Index file was deleted from FoxPro (delete tag all) to isolate problem.
Test conditions:
1 Source ResultSet with all rows of table was created (by query "select * from table").
2 Run iteration of source ResultSet
3 On each step:
get source value from character field:
byte[] b = rsSource.getBytes("field");
run prepared statement to search by source value in database table:
stmtFind = connection.prepareStatement("select * from table where field=?");
stmtFind.setBytes(1, b);
ResultSet rsFind = stmtFind.executeQuery();
Result: rsFind in general returns data, but did not contains row for several search values taken from same table.
This problem is blocks future licensed use of driver for production system.
Any suggestion?
Thanks.
|
Re:Improper result of search byte value in column of character type |
Transer |
2009-11-30 11:35:07 |
|
Note: character column contains symbols with codes in range 0..255, not only alpha-numeric.
|
Re:Re:Improper result of search byte value in column of character type |
HXTT Support |
2009-11-30 16:59:49 |
>Index file was deleted from FoxPro (delete tag all) to isolate problem.
>stmtFind = connection.prepareStatement("select * from table where field=?");
It will use automatic temporary index.
>Note: character column contains symbols with codes in range 0..255, not only
>alpha-numeric.
Failed to recur your issue. Please email your test dbf sample.
|
Improper result of search byte value in column of character type |
Transer |
2010-01-05 12:48:27 |
Hi!
Test data for support request with subject "Improper result of search byte value in column of character type" was sent to e-mail support@hxtt.com.
Thanks.
|
Re:Improper result of search byte value in column of character type |
Transer |
2010-01-05 13:11:36 |
|
Sorry, can't comment on initial message.
|
Re:Re:Improper result of search byte value in column of character type |
HXTT Support |
2010-01-05 17:58:24 |
It should be resulted by that CDX file is using different collation sequence. What's the program's name and version, which build that CDX file, since HXTT DBF failed to find a collation sequence name, and use default collation sequence to seek?
|
Re:Re:Re:Improper result of search byte value in column of character type |
Transer |
2010-01-09 09:49:11 |
|
Table and compound index were created with FoxPro 2.6a (X) for DOS with CODEPAGE=866 in CONFIG.FP and default collation sequence MACHINE. Machine collation is default for earlier FoxPro versions and was used in legacy system.
|
Re:Re:Re:Re:Improper result of search byte value in column of character type |
Transer |
2010-01-09 12:59:39 |
|
Problem also reproduced if table without CDX is used (no compound or other index files, only .DBF). Finding with CDX gets 636 problem values and 391 if no index file (for sent to support test table). To remove index file FoxPro command DELETE TAG ALL was used and checked that folder didn't contains *.CDX.
|
Re:Re:Re:Re:Re:Improper result of search byte value in column of character type |
HXTT Support |
2010-01-12 23:31:57 |
>Problem also reproduced if table without CDX is used (no compound or other index
>files, only .DBF).
Because it's using temporary index. Please download the latest package, which has resolved that issue.
|
Re:Re:Re:Re:Re:Re:Improper result of search byte value in column of character type |
Transer |
2010-01-13 03:56:36 |
|
Driver HXTT DBF 4.2.117 works well (with and without .CDX). Thanks a lot!
|