Re: Seeking by index of nvarchar field does not works

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



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





.



Relevant Pages

  • Re: Null in SQL 2005/2008
    ... Starting in SQL 7, ... field, a long integer field, an integer field, a Varcharfield and this ... plus overhead ... You can choose to store the data in compressed format, which will take a lot fewer bytes (storage is much too complex to describe here), OR define your nullable columns as SPARSE, in which case there will be just 4 bits of overhead for each null value. ...
    (microsoft.public.sqlserver.server)
  • Null in SQL 2005/2008
    ... Just want to make sure that SQL 2205/2008 is still treating Null value the ... not take up any additional storage space. ... field, a long integer field, an integer field, a Varcharfield and this ... this record should only consume 4 bytes long plus the overhead ...
    (microsoft.public.sqlserver.server)
  • Re: size of ftInteger
    ... I did some more investigating. ... When setting up an integer field in a MS SQL table, ...
    (borland.public.delphi.database.ado)
  • Integer displaying with two decimals!
    ... integer field, "TSPyear". ... I have created a combobox which ... Totals SQL. ... properties of the field in the SQL to "fixed, 0 decimals", no change. ...
    (microsoft.public.access.formscoding)