Click here to Skip to main content
15,917,652 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: problem with browser Pin
N a v a n e e t h25-Feb-09 1:49
N a v a n e e t h25-Feb-09 1:49 
QuestionHow to Browse Folder Pin
trushitshah25-Feb-09 0:46
trushitshah25-Feb-09 0:46 
AnswerRe: How to Browse Folder Pin
N a v a n e e t h25-Feb-09 1:55
N a v a n e e t h25-Feb-09 1:55 
AnswerRe: How to Browse Folder Pin
Xmen Real 25-Feb-09 4:53
professional Xmen Real 25-Feb-09 4:53 
QuestionProblem With Datatable Pin
ais0725-Feb-09 0:46
ais0725-Feb-09 0:46 
AnswerRe: Problem With Datatable Pin
N a v a n e e t h25-Feb-09 1:56
N a v a n e e t h25-Feb-09 1:56 
Questionretrieving a sql results with a specific Id using Rank and Partition Pin
gottimukkala25-Feb-09 0:46
gottimukkala25-Feb-09 0:46 
AnswerRe: retrieving a sql results with a specific Id using Rank and Partition Pin
Mark Graham25-Feb-09 1:22
Mark Graham25-Feb-09 1:22 
What springs to mind....

The first thing I would look at is returning two result sets (presumably your first would have one row in it and your second would have many, excluding the unique row you've already selected, ordered by create date) from your store proc. Then using a ADO.Net DataReader I would merge the two result sets in code.

Here's some pseudo with some c#

    // create return object (a list) here

    using ( SqlDataReader reader = command.ExecuteReader( ) )
    {
        // read first doc

        if ( reader.Read( ) )
        {
            // add data to a DTO, or business object then add to results list
        }

        // move to next result set and read the other docs

        reader.NextResult();

        while ( reader.Read( ) )
        {
            // add data to a DTO, or business object then add to results list
        }
    }
    // return list - the merged results


This is still only one stored proc call; one trip across the wire (not that two trips in this case would make the slightest bit of difference).


Has this helped?

Mark Graham (MCP) // The Doodler
blogging about C#, Asp.Net, and Design Patterns at: csCoffee[^]
and contributing at dotNet Notepad[^]

Answerupdate/delete/edit in gridview-asp.net(2.0) Pin
muana_gunner25-Feb-09 0:36
muana_gunner25-Feb-09 0:36 
QuestionSecurity Pin
ellllllllie24-Feb-09 23:37
ellllllllie24-Feb-09 23:37 
QuestionEvents in a UserControl Pin
Vimalsoft(Pty) Ltd24-Feb-09 23:06
professionalVimalsoft(Pty) Ltd24-Feb-09 23:06 
AnswerRe: Events in a UserControl Pin
N a v a n e e t h25-Feb-09 3:01
N a v a n e e t h25-Feb-09 3:01 
GeneralRe: Events in a UserControl Pin
Vimalsoft(Pty) Ltd25-Feb-09 3:07
professionalVimalsoft(Pty) Ltd25-Feb-09 3:07 
Questionabout asp dot net? Pin
che_kar24-Feb-09 23:04
che_kar24-Feb-09 23:04 
AnswerRe: about asp dot net? Pin
kumareshTMC24-Feb-09 23:26
kumareshTMC24-Feb-09 23:26 
GeneralRe: about asp dot net? Pin
Ravindra Bisen25-Feb-09 1:00
Ravindra Bisen25-Feb-09 1:00 
Questionhow to open the download page in another window Pin
lakshmichawala24-Feb-09 22:42
lakshmichawala24-Feb-09 22:42 
AnswerRe: how to open the download page in another window Pin
Calin Tatar25-Feb-09 0:37
Calin Tatar25-Feb-09 0:37 
QuestionHow to redirec From Https to Http page in same application Pin
jainmravi24-Feb-09 22:36
jainmravi24-Feb-09 22:36 
Questionerror in reading file Pin
meghamaharshi24-Feb-09 22:12
meghamaharshi24-Feb-09 22:12 
AnswerRe: error in reading file Pin
N a v a n e e t h24-Feb-09 22:17
N a v a n e e t h24-Feb-09 22:17 
GeneralRe: error in reading file Pin
meghamaharshi24-Feb-09 22:29
meghamaharshi24-Feb-09 22:29 
GeneralRe: error in reading file Pin
Expert Coming24-Feb-09 22:33
Expert Coming24-Feb-09 22:33 
GeneralRe: error in reading file Pin
meghamaharshi24-Feb-09 22:38
meghamaharshi24-Feb-09 22:38 
QuestionImage Saving into SQL Database Pin
Robymon24-Feb-09 21:23
Robymon24-Feb-09 21:23 

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.