Please any help will be appreciated..

I'm trying to save sorted records in a dataset based on
request.querystring value.  I'm having problem saving the edited
record back to the datasource based on the sorted order.

lets say
Order = "ID";

   if (Request.QueryString["Order"] != null)
       {
           Order = Request.QueryString["Order"];
}

after querying the datasource n order by "Order"
the page initially loads ordered by ID.

but when I change the sorted order to something else thats not ID say
mgrID

it saves the data in the wrong place...basically resetting the Order
back to ID and saves by ID...

here is my update command

int cell = 0;
if (Request["update"] == "Save")
       {
 foreach (string var in Request.Form)
           {

    DS4.Tables[0].Rows[cell]["rank"] = Request.Form[var];
                           command = new OleDbCommand("UPDATE dbo.rank
SET rank.rank =" + Request.Form[var] + "where nomID =" +
DS4.Tables[0].Rows[cell]["nomID"] + "and mgrID =" +
DS4.Tables[0].Rows[cell]["mgrID"] + "", conn4);
                           DA4.UpdateCommand = command;
                           DA4.Update(DS4);
cell++;

 }
}

what can I do to save by sorted order


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---

Reply via email to