Re: Seeking by index of nvarchar field does not works
- From: "William LaMartin" <lamartin@xxxxxxxxxxxxxxx>
- Date: Mon, 1 Jan 2007 18:49:40 -0500
Note, one of the fields is an integer field. Note saying that is necessary
since I don't know. But it might be--even though it is not in the
documentation.
"Whitebear" <promethee@xxxxxxxxxxxxxxxx> wrote in message
news:F8F58A35-9E61-44C4-B159-E57B4D311B91@xxxxxxxxxxxxxxxx
But the same application works in SQL Compact on my desktop! And Books
Online
for SQL Compact contains sample with seeking by more exotic compound
index,
which consists of integer, money and datetime fields.
"William LaMartin" wrote:
Only data columns of the integer data types can be used for identity
columns
in SQLCE. Possibly the same is true for indexes, however, I can not find
that in the documentation and don't really think it is true. Or, as you
guess, maybe seek doesn't work with non-integer indexes.
"Whitebear" <promethee@xxxxxxxxxxxxxxxx> wrote in message
news:1F658C38-D187-441C-A3C2-1CA3A1129060@xxxxxxxxxxxxxxxx
Hi!
I have simple SQL Mobile database with one table. This table contains
indexed field of type nvarchar(18). I write the following program:
SqlCeConnection conn = new SqlCeConnection(strconn);
conn.Open();
SqlCeCommand R_Names = new SqlCeCommand();
R_Names.Connection = conn;
R_Names.CommandType = CommandType.TableDirect;
R_Names.CommandText = "R_Names";
R_Names.IndexName = "EANIDX";
SqlCeResultSet R_Names_reader =
R_Names.ExecuteResultSet(ResultSetOptions.Scrollable |
ResultSetOptions.Updatable);
...
if (R_Names_reader.Seek(DbSeekOptions.FirstEqual, textBox1.Text))
...
Calling SqlCeResultSet.Seek method on my PC returns true and
application
works fine. When I try to execute this program on Pocket PC 2003 SE
Emulator
or my Pocket PC device, I see that calling Seek returns false. If I
change
type of the field to bigint (it is a EAN field) - it works fine.
Maybe I'm doing something wrong, or the latest CTP of SQL 2005 Mobile
seeks
nvarchar index incorrectly?
Thank you
.
- Prev by Date: Re: Deploying SQL CE?
- Next by Date: Replication Problem
- Previous by thread: Deploying SQL CE?
- Next by thread: Replication Problem
- Index(es):
Relevant Pages
|