Click here to Skip to main content
15,891,033 members
Home / Discussions / C#
   

C#

 
GeneralRe: Very Urgent: How Can I make a compelete Instalation file Pin
alhassan017-Nov-06 19:34
alhassan017-Nov-06 19:34 
QuestionAm I setting up my architecture correctly? Pin
xdavidx3-Nov-06 17:57
xdavidx3-Nov-06 17:57 
AnswerRe: Am I setting up my architecture correctly? Pin
CooperWu3-Nov-06 22:38
CooperWu3-Nov-06 22:38 
AnswerRe: Am I setting up my architecture correctly? Pin
beatles16924-Nov-06 1:01
beatles16924-Nov-06 1:01 
QuestionHow to retrieve the current row of a Data Set Pin
Guardian513-Nov-06 17:50
Guardian513-Nov-06 17:50 
AnswerRe: How to retrieve the current row of a Data Set Pin
beatles16924-Nov-06 1:24
beatles16924-Nov-06 1:24 
GeneralRe: How to retrieve the current row of a Data Set Pin
Guardian514-Nov-06 15:50
Guardian514-Nov-06 15:50 
GeneralRe: How to retrieve the current row of a Data Set Pin
beatles16925-Nov-06 0:04
beatles16925-Nov-06 0:04 
Hi You can hold the key of a new row that has been added and set your current row to this new row (using sort and find metohd)
if you sort your table using its default view property (myTable.DefaultView.Sort="Field1 DESC,Field2"; ) then the next button will show the next record according to sorted key.
But I have a question to ask, if there's only one record showing to user each time , why do you load all the data to a data table ? you can load a record whenever it's needed.
for example if you have a code field that you want to use as your sort key you can get the next record using :
<br />
SELECT TOP 1 * FROM myTable WHERE code>@currentCode ORDER BY CODE<br />

and you can get the previous record using :
<br />
SELECT TOP 1 * FROM myTable WHERE code<@currentCode ORDER BY CODE DESC<br />


Getting the first and last records is also very easy.
<br />
SELECT TOP 1 * FROM myTable ORDER BY Code //First record<br />
SELECT TOP 1 * FROM myTable ORDER BY Code DESC//Last record<br />
<br />

The good news is that you can find your record before loading it to your app thus only the needed data is loaded.
Regrads
GeneralRe: How to retrieve the current row of a Data Set Pin
Guardian515-Nov-06 23:15
Guardian515-Nov-06 23:15 
QuestionVS2005 SP1 Beta release Pin
Glen Harvy3-Nov-06 16:47
Glen Harvy3-Nov-06 16:47 
AnswerRe: VS2005 SP1 Beta release Pin
André Ziegler4-Nov-06 12:08
André Ziegler4-Nov-06 12:08 
Questionquery about data grid view Pin
AmitDey3-Nov-06 16:21
AmitDey3-Nov-06 16:21 
AnswerRe: query about data grid view Pin
AB77713-Nov-06 17:39
AB77713-Nov-06 17:39 
GeneralRe: query about data grid view Pin
AmitDey3-Nov-06 21:52
AmitDey3-Nov-06 21:52 
QuestionWebBrowser Tree View? Pin
fredsparkle3-Nov-06 15:53
fredsparkle3-Nov-06 15:53 
QuestionConverting 4 bytes of int to string? Pin
Lord Kixdemp3-Nov-06 14:59
Lord Kixdemp3-Nov-06 14:59 
AnswerRe: Converting 4 bytes of int to string? Pin
Guffa3-Nov-06 16:56
Guffa3-Nov-06 16:56 
GeneralRe: Converting 4 bytes of int to string? Pin
Lord Kixdemp5-Nov-06 9:15
Lord Kixdemp5-Nov-06 9:15 
Questionkeyboard layout for a selected window Pin
seq-3-Nov-06 11:29
seq-3-Nov-06 11:29 
AnswerRe: keyboard layout for a selected window Pin
beatles16924-Nov-06 1:39
beatles16924-Nov-06 1:39 
QuestionDrawing on a picturebox.image Pin
rzvme3-Nov-06 8:42
rzvme3-Nov-06 8:42 
AnswerRe: Drawing on a picturebox.image Pin
Christian Graus3-Nov-06 12:02
protectorChristian Graus3-Nov-06 12:02 
GeneralRe: Drawing on a picturebox.image Pin
rzvme4-Nov-06 1:25
rzvme4-Nov-06 1:25 
AnswerRe: Drawing on a picturebox.image Pin
rzvme4-Nov-06 7:31
rzvme4-Nov-06 7:31 
QuestionPocket PC 2003 open a WMV file i mediaplayer Pin
Futte0073-Nov-06 8:39
Futte0073-Nov-06 8:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.