PC Review


Reply
Thread Tools Rate Thread

data retrieval in sql ce

 
 
=?Utf-8?B?UGhpbGlwIEdlcm1hbm9z?=
Guest
Posts: n/a
 
      14th Jun 2005
Hello,

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

Thank you

 
Reply With Quote
 
 
 
 
W.G. Ryan eMVP
Guest
Posts: n/a
 
      14th Jun 2005
In the SqlCE Library, it's a mechanism that you can retrieve data a lot
faster than doing a regular Select statmenent with a WHERE Clause. Remember
though, while TableDirect is available w/ other providers, what I'm speaking
about here is specifically about CE.

Basically, you create a new command and specify the tablename

SqlCeCommand cmd = new SqlCeCommand("MyTableName", connection);
Next, specify the index

cmd.IndexName = "WhateverMyIndexNameIs";

Next, set the range...
cmd.SetRange(DbRangeOptions.InclusiveStart|DbRangeOptions.InclusiveEnd,
beginningValue, endingValue);

now, you execute your reader...

But instead of while(Reader.Read())

Use, Reader.Seek(DbSeekOptions.AfterEqual, firstvalue, secondValue) where
firstvalue and secondvalue correspond to the range you wanted to search on
in the index.

It's a faster way to grab data but from what I've seen, very very little
documentation on it. There is some stuff in BOL for Sql CE though.

Let me know if you have any furhter questions.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Philip Germanos" <(E-Mail Removed)> wrote in
message news:F2B42563-913F-414D-9810-(E-Mail Removed)...
> Hello,
>
> Please what is: Table Direct mode with Seek on an index ?
> And how to use it ?
>
> Thank you
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Retrieval traumajohn Windows XP General 4 16th Apr 2009 08:13 PM
Data Retrieval gkguthikonda@gmail.com Microsoft Dot NET Framework Forms 1 14th Mar 2006 11:01 AM
ASP 2.0 SQL data retrieval =?Utf-8?B?QmlsIENsaWNr?= Microsoft Dot NET 0 20th Jan 2006 08:56 PM
RAW data retrieval =?Utf-8?B?U29tZWd1eWluZmw=?= Windows XP Hardware 1 19th May 2004 01:54 AM
retrieval of old data JIM CHENEY Windows XP Accessibility 1 7th Nov 2003 06:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:21 AM.