Re: Opening CE database for seek when multiple search orders specified
From: Paul Perkins (paul.perkins_at_nospam.thanks.com)
Date: 03/22/04
- Next message: geardown: "Re: Which VB?"
- Previous message: Chris Tacke, eMVP: "Re: Which VB?"
- In reply to: Peter Foot [MVP]: "Re: Opening CE database for seek when multiple search orders specified"
- Next in thread: Paul Perkins: "Re: Opening CE database for seek when multiple search orders specified"
- Reply: Paul Perkins: "Re: Opening CE database for seek when multiple search orders specified"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: geardown: "Re: Which VB?"
- Previous message: Chris Tacke, eMVP: "Re: Which VB?"
- In reply to: Peter Foot [MVP]: "Re: Opening CE database for seek when multiple search orders specified"
- Next in thread: Paul Perkins: "Re: Opening CE database for seek when multiple search orders specified"
- Reply: Paul Perkins: "Re: Opening CE database for seek when multiple search orders specified"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|