Board index » delphi » HELP! I AM GOING CRAZY WITH ADO SEARCHES

HELP! I AM GOING CRAZY WITH ADO SEARCHES

I am converting my app to use Ado tables (connecting to Access 2000) but I
have big problems with searches!

* LOCATE METHOD:
- it does not find records when specifing datetime values in the KeyValues
- it does not find records with loParcialKey if using more than one search
field

* SEEK METHOD
- i cant use index based searches with Seek. It returns and "invalid
operation. Not supported by the provider".
- i cant set the IndexName property when the table is active.

HELP ! PLEASE !

 

Re:HELP! I AM GOING CRAZY WITH ADO SEARCHES


Quote
>I am converting my app to use Ado tables (connecting to Access 2000) but I
>have big problems with searches!

>* LOCATE METHOD:
>- it does not find records when specifing datetime values in the KeyValues

You probably have a millesecond component in the time value that can not be
searched for.  DateTime fields are very poor choices if you have to locate
values in.

Quote
>- it does not find records with loParcialKey if using more than one search
>field

This works when I try it.

Quote
>* SEEK METHOD
>- i cant use index based searches with Seek. It returns and "invalid
>operation. Not supported by the provider".

To use Seek you need to set CursorLocation = clUseServer and TableDirect to True
to use Seek and IndexName to an index.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:HELP! I AM GOING CRAZY WITH ADO SEARCHES


Quote
> >* LOCATE METHOD:
> >- it does not find records when specifing datetime values in the
KeyValues
> You probably have a millesecond component in the time value that can not
be
> searched for.  DateTime fields are very poor choices if you have to locate
> values in.

> >- it does not find records with loParcialKey if using more than one
search
> >field
> This works when I try it.

Yes, I made it work too with the setting you told for Seek, but the partial
key does not work correctly (I looked into the adodb.pas and I am sure is a
Delphi bug)

Re:HELP! I AM GOING CRAZY WITH ADO SEARCHES


Quote
> but the partial
>key does not work correctly

How do you define working correctly.    If I try Locate LoPartialKey it on two
Alpha fields with the value provided for he second field a partial match it
finds the record just fine.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:HELP! I AM GOING CRAZY WITH ADO SEARCHES


I still think Delphi has errors in the implementation. I checked the ADODB
code and some parts are against some ADO definitions...

Other Threads