Re: Opening CE database for seek when multiple search orders specified

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Paul Perkins (paul.perkins_at_nospam.thanks.com)
Date: 03/22/04


Date: Mon, 22 Mar 2004 15:04:39 +0000

Peter Foot [MVP] wrote:

> When you call CeOpenDatabase you specify which index (sort-order) is used
> during that database session. Therefore you should specify one of the sort
> orders of the MSysFields table. You can query these with the CeGetOidInfoEx
> function from the MSysFields table Oid.
>
> Peter
>

Thanks for the reply, Peter. That's what I'm doing, but specifying the
sort order that I want results in a 'parameter is incorrect' error from
GetLastError.

I'm using exactly the API you describe to query the sort orders
available, but using either results in the same error.

        MAKELONG (CEVT_LPWSTR, 2386) - Presumably field name
        MAKELONG (CEVT_UI4, 86) - What is this?

Ideally, I'd like to seek on CEOID (table ID).

Here's the code snippet that I'm using:

   CEOIDINFO oidinfo = 0; // keep this as zero as were using the 'name'.

   m_DBhandle = CeOpenDatabase(&oidDB, m_wszDBName, m_SortProp, 0, NULL);

When m_SortProp is set to '0' the code works. When set to either of the
two values above, the open fails.

Thanks again,

     Paul.



Relevant Pages

  • Re: Make Table Query - Sorting Errors
    ... Dim OutputTable As DAO.Recordset ... The query to concatenate the CAMPNO values will need to be LOOKING at the ... If you post the query you are using to do this, I beleive we can get it to ... Is there a command that I can use in the module code to first sort the ...
    (microsoft.public.access.queries)
  • Re: Make Table Query - Sorting Errors
    ... You sort in a query, ... You can do a compound sort in a query. ... "Tom Ellison" wrote: ... resulting table only has one record for each value of "CAMPNO". ...
    (microsoft.public.access.queries)
  • Re: Query doesnt always sort
    ... You have to use a query to sort the data in to your required order and then ... Access MVP 2002-2005, 2007 ... University of Maryland Baltimore County ... How do I impose a sort on the datasheet view? ...
    (microsoft.public.access.queries)
  • Re: Make Table Query - Sorting Errors
    ... sorted, it will sort them as they arrive. ... you query them, why is this of any concern to you? ... correctly on the field CAMPNO. ... "Duane Hookom" wrote: ...
    (microsoft.public.access.queries)
  • Re: Make Table Query - Sorting Errors
    ... MS Access MVP ... resulting table only has one record for each value of "CAMPNO". ... Is there a command that I can use in the module code to first sort the ... I have a make table query that is supposed to sort in ascending order ...
    (microsoft.public.access.queries)