SEEK characters limitation

C

chris

I am using DAO360 and Seek command on table with MEMO field. It seems that
Seek command searches only for 255 characters, not more. Am I right ?

Is it a bug ? Because in documentation of Seek I did not find limitation in
characters to be searched...

Thanks a lot in advance!
 
A

Alex Dybenko

Hi,
as seek works on primary key only, and if you have memo field in primary
key - then only first 255 chars indexed - then seek searches only these 255
chars

Not sure that using Memo a primary key is a good idea, what was a reason for
this?

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
C

chris

Hi Alex,

I am using SEEK on any indexed fields (unique fields), primary or not. It is
very fast.

In help of DAO, it does not mention that it needs to be primary key (Locates
the record in an indexed table-type Recordset object that satisfies the
specified criteria for the current index and makes that record the current
record (Microsoft Jet workspaces only)).

This memo field I am using is an indexed one, but not the primary one. It
includes unique values and it's my link to description of items I get from
TXT files, since I import data from another system.

FINDFIRST works ok, but it is very slow...
 
R

Robert Morley

Alex said:
Hi,
as seek works on primary key only, and if you have memo field in primary
key - then only first 255 chars indexed - then seek searches only these
255 chars

Not sure that using Memo a primary key is a good idea, what was a reason
for this?

Did I miss something somewhere? It's been a while since I've worked with
DAO, but I'm pretty sure it works on ANY index, not just the primary key.



Rob
 
R

Robert Morley

chris said:
Hi Alex,

I am using SEEK on any indexed fields (unique fields), primary or not. It is
very fast.

In help of DAO, it does not mention that it needs to be primary key (Locates
the record in an indexed table-type Recordset object that satisfies the
specified criteria for the current index and makes that record the current
record (Microsoft Jet workspaces only)).

This memo field I am using is an indexed one, but not the primary one. It
includes unique values and it's my link to description of items I get from
TXT files, since I import data from another system.

FINDFIRST works ok, but it is very slow...

As I said in my other message, it's been a while since I've done a lot of
work with DAO, but as I recall, Jet doesn't actually index an entire Memo
field - I believe it treats it as a text field (thus the 255 characters) and
builds its index based on that. That's what I recall and my recollection
fits your observations, but that's about as far as I can get you.


Rob
 
C

chris

Thanks Robert,

You are right. Even if Jet allows you to use Index (unique or not) on Memo,
only first 255 characters are indexed.
 
Top