Locate not finding files

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Locate not finding files

Post by sandy771 » Sat 31 Jul 2010 11:27

Further to my locate speed problem I have found that on a test set of a few thousand sha1 hashes locate fails to find the hash I am looking for (I have used a database browser to confirm that the hash is in the database.)

my commands are in this order:

sql = "create index if not exists Hashindex on InnHash(sha1)";

sql = "select * from InnHash order by md5";
(not sure if the above is necessary)

if(ShaHash->Locate("sha1", sha1, TLocateOptions() << loCaseInsensitive))

ShaHash is a UniQuery and is unidirectional


in both cases that hashes are in uppercase, but I have used the case insensitive option anyway.

The UseUnicode opton is set in the UniConnector - but cant see how this would affect it.

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Post by sandy771 » Sun 01 Aug 2010 12:43

Interesting

I have hard coded the query by access the sqlite dll directly and a select x from table finds the required value. This will work for me anyway as this routine does not need to display the data in a table.

DepSoft
Posts: 20
Joined: Tue 27 Jul 2010 03:01
Location: Western Australia

Post by DepSoft » Mon 02 Aug 2010 03:35

Was the UniQuery UniDirectional, I think that will prevent locate working correctly because it can't move backwards.

Regads, Paul.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 02 Aug 2010 15:44

Hello

Unfortunately I cannot reproduce this issue. Please provide me the following information:
- The DDL script for creating the InnHash table
- The DDL script for creating the index for the InnHash table
- The SQL script for inserting data that cannot be found by the Locate method
- The Delphi code that calls the Locate method (in your first post you don't specify the value of the sha1 variable)

Post Reply