Re: Search fails, but only for a specific sequence

Tech-Archive recommends: Fix windows errors by optimizing your registry



Well, TableDirect is a bit of a secret ;-) but I think people who do know about it don't use if often (including me) because using T-SQL is more natural for most developers and easier. It is fast though, as you found, and in low memory situations it can be the only viable option.

I don't know if your index was faulty or not since you didn't show a list of the data values that were indexing "incorrectly". If the index is wrong, I can report that to Microsoft to get it resolved, but they'll want to see a reproducible example.

--
Ginny Caughey
Device Application Development MVP

www.wasteworks.com
Scalehouse and Billing Software for Waste Management



"Puddles" <Puddles@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:F91267BD-9F67-471D-96E6-58FE5BEE94F2@xxxxxxxxxxxxxxxx
Hallo Ginny,

neat tool, this TableDirect... how come I had never discovered it in over
three years of Mobile development? Huge speed advantage over SQL queries,
but (and it is a big 'but') there is no easy way to implement DISTINCT.
Three options are 1. a new table with only unique elements (blows the
database size), 2. filter row for row in C# (slow) or 3. use the ToTable()
function of a DataView (memory hungry). Hummm, now it looks like the SQL
query is infact the better option!

All very interesting and my original issue has solved itself anyway: a new
production with changed data (happens every 14 days) - in effect the same as
producing the index using DESC. But I think this is ignoring the real
problem - the index was faulty and this must be regarded as a bug by the
developers at Microsoft! Who know where it will appear next!

"Ginny Caughey [MVP]" wrote:

Puddles,

You wouldn't load the entire table into memory with TableDirect since you'd
specify an index name and range. But in any case since adding DESC changes
the behavior to the one you want, I'd expect there to be a value somewhere
between 'ne' and 'ney' that is causing the result you see. I think if you
look at the names in that range you'll get more insight what exactly is
happening. If you do, be sure to tell the rest of us!

--
Ginny Caughey
Device Application Development MVP

www.wasteworks.com
Software for Solid Waste Management



"Puddles" <Puddles@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:46551D72-D5A7-4039-89E8-AA78803205B1@xxxxxxxxxxxxxxxx
> Hallo Ginny,
>
> Using TableDirect would imply moving the entire table into the PDA's
> memory
> and paring it there with C#... then why bother with the database?
>
> I do not think there are any strange characters causing the system to > go
> crazy - the looser search for 'ne%' works and includes everything that
> should
> be returned by 'ney%'!
>
> I have created a workaround by adding the DESC parameter to the index
> definiton (yes, the name colunm has it's own index), though I rather > fear
> this has simply moved the bug to a new location (I wonder which > customer
> will
> discover it first?).
>
> "Ginny Caughey [MVP]" wrote:
>
>> What are the medicines you would expect to find in that range of >> values?
>> I'm
>> guessing that accented characters specific to German might be causing >> the
>> result you're seeing.
>>
>> Assuming that you have an index on Name, do you get the same result >> using
>> TableDirect access? The reason I ask is that using TableDirect no >> longer
>> uses the query processor but it does still use the index order.
>>
>> -- >> Ginny Caughey
>> Device Application Development MVP
>>
>> www.wasteworks.com
>> Software for Solid Waste Management
>>
>>
>>
>> "Puddles" <Puddles@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:2295EF7D-6EF7-480F-A838-AFB11C0F2DFF@xxxxxxxxxxxxxxxx
>> > This is weird! My medical database works just fine and has done >> > since
>> > ages,
>> > until someone treid to look for a medicin begining with 'ney...'
>> >
>> > Major Error 0x8007007A, Minor Error 0
>> >> SELECT * FROM t_artikel WHERE NAME LIKE 'ney%'
>> > Der an einen Systemaufruf übergebene Datenbereich ist zu klein.
>> >
>> > OK, so it's a German installation, but the issue is not hardware
>> > relevant:
>> > same on any Mobile device and on my PC. Varying the search string
>> > usually
>> > works, like 'ne%' is OK and 'n_y%' is ok, but 'new%' fails as does
>> > 'ney_%'.
>> >
>> > Can anyone tell me what is going on here?
>> >
>> > Thanks in advance.
>> >
>>


.



Relevant Pages

  • Re: Search fails, but only for a specific sequence
    ... Obviously I could give you my database to test - but it is over 50Mb big! ... in low memory situations it can be the only viable option. ... Device Application Development MVP ... You wouldn't load the entire table into memory with TableDirect since ...
    (microsoft.public.sqlserver.ce)
  • Re: Strange SqlCE error
    ... Device Application Development MVP ... On Jan 6, 6:49 am, "Ginny Caughey MVP" ... My problem involves the TableDirect operation and is SqlCE related. ... the error message makes no sense to me. ...
    (microsoft.public.sqlserver.ce)
  • Re: Strange SqlCE error
    ... Device Application Development MVP ... On Jan 5, 6:54 pm, "Ginny Caughey MVP" ... I don't recall ever seeing this particular error message, ... It is strange that you only have the issue with TableDirect. ...
    (microsoft.public.sqlserver.ce)
  • Re: Strange SqlCE error
    ... Device Application Development MVP ... On Jan 5, 6:54 pm, "Ginny Caughey MVP" ... My problem involves the TableDirect operation and is SqlCE related. ... the error message makes no sense to me. ...
    (microsoft.public.sqlserver.ce)
  • Re: Strange SqlCE error
    ... Device Application Development MVP ... On Jan 6, 6:49 am, "Ginny Caughey MVP" ... > I don't recall ever seeing this particular error message, ... >> I'm getting this error when using TableDirect to open a table. ...
    (microsoft.public.sqlserver.ce)