Home > Archive > MS SQLCE > June 2005 > Data retrieval









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Data retrieval
Philip Germanos

2005-06-14, 8:24 pm

Hello,

Please what is: Table Direct mode with Seek on an index ?
And how to use it ?

Thank you

Joćo Paulo Figueira [eMVP]

2005-06-14, 8:24 pm

OLE DB allows you to open SQL CE tables directly without using a SQL
command. This gives you raw access to the table (all columns are considered)
and you can also specify an index (the primary key or another index you may
have created against the table). If you open the table this way and specify
an index, table rows will be sorted accordingly and you will be able to
perform very fast searches on the indexed columns.

--
Joćo Paulo Figueira
Embedded MVP
http://nativemobile.blogspot.com/

"Philip Germanos" < PhilipGermanos@discu
ssions.microsoft.com> wrote in
message news:1729F1C5-04E8-482E-A2EE- DAC57AD90A3A@microso
ft.com...
> Hello,
>
> Please what is: Table Direct mode with Seek on an index ?
> And how to use it ?
>
> Thank you
>



Philip Germanos

2005-06-15, 7:23 am

Thank you,
but how do i use it?

"João Paulo Figueira [eMVP]" wrote:

> OLE DB allows you to open SQL CE tables directly without using a SQL
> command. This gives you raw access to the table (all columns are considered)
> and you can also specify an index (the primary key or another index you may
> have created against the table). If you open the table this way and specify
> an index, table rows will be sorted accordingly and you will be able to
> perform very fast searches on the indexed columns.
>
> --
> João Paulo Figueira
> Embedded MVP
> http://nativemobile.blogspot.com/
>
> "Philip Germanos" < PhilipGermanos@discu
ssions.microsoft.com> wrote in
> message news:1729F1C5-04E8-482E-A2EE- DAC57AD90A3A@microso
ft.com...
>
>
>

Joćo Paulo Figueira [eMVP]

2005-06-15, 1:24 pm

OLE DB interfaces only to native code, unless you write a CF wrapper. Your
best shot is to use the new SqlCeResultSet in SQL Mobile (3.0). It does
essentially this but from managed code.

--
Joćo Paulo Figueira
Embedded MVP
http://nativemobile.blogspot.com/

"Philip Germanos" < PhilipGermanos@discu
ssions.microsoft.com> wrote in
message news:4AD8616F-935A-4BCC-9BB9- 8BD32606A22D@microso
ft.com...[color=darkred]
> Thank you,
> but how do i use it?
>
> "Joćo Paulo Figueira [eMVP]" wrote:
>


Rob Blij

2005-06-21, 3:23 am

Interesting an MVP giving that answer.

It is possible with the SQLCE classes in the Compact Framework

Example:
cmd.CommandType = CommandType.TableDirect;
cmd.CommandText = "Orders";
//Assume: Index contains one column [datetime]
cmd.IndexName = "SomeIndex";
object[] start = new object[1];
object[] end = new object[1];
start[0] = new SqlDateTime(2001, 1, 1);
end[0] = new SqlDateTime(2002, 2, 3;
cmd. SetRange(DbRangeOpti
ons.Match, start, end);
SqlCeDataReader rdr = cmd.ExecuteReader();
rdr.Seek(DbSeekOptions.FirstEqual,
new SqlDateTime(2001,3,4
));

while(rdr.Read()) { }




"Joćo Paulo Figueira [eMVP]" <joao.figueira@primeworks.takethisout.pt> wrote
in message news:uszRuCdcFHA.464@TK2MSFTNGP15.phx.gbl...
> OLE DB interfaces only to native code, unless you write a CF wrapper. Your
> best shot is to use the new SqlCeResultSet in SQL Mobile (3.0). It does
> essentially this but from managed code.
>
> --
> Joćo Paulo Figueira
> Embedded MVP
> http://nativemobile.blogspot.com/
>
> "Philip Germanos" < PhilipGermanos@discu
ssions.microsoft.com> wrote in
> message news:4AD8616F-935A-4BCC-9BB9- 8BD32606A22D@microso
ft.com...
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com