Click here to Skip to main content
15,912,977 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Which one is better ASP or PHP? Pin
sashidhar5-Oct-09 18:38
sashidhar5-Oct-09 18:38 
QuestionIIS7 deployment problem Pin
Muhammad Gouda3-Oct-09 23:08
Muhammad Gouda3-Oct-09 23:08 
AnswerRe: IIS7 deployment problem Pin
Manas Bhardwaj3-Oct-09 23:16
professionalManas Bhardwaj3-Oct-09 23:16 
GeneralRe: IIS7 deployment problem (SOLVED) Pin
Muhammad Gouda3-Oct-09 23:43
Muhammad Gouda3-Oct-09 23:43 
GeneralRe: IIS7 deployment problem (SOLVED) Pin
Manas Bhardwaj3-Oct-09 23:46
professionalManas Bhardwaj3-Oct-09 23:46 
QuestionHow to display website logo on addressbar? Pin
Jagz W3-Oct-09 22:51
professionalJagz W3-Oct-09 22:51 
AnswerRe: How to display website logo on addressbar? Pin
Manas Bhardwaj3-Oct-09 23:02
professionalManas Bhardwaj3-Oct-09 23:02 
QuestionLoadOption.OverwriteChanges - Functionlaity [modified] Pin
Satish323-Oct-09 21:46
Satish323-Oct-09 21:46 
<I have written code to test the SqlDataAdaptor's LoadOpton functionality for LoadOption.OverwriteChanges.
But the code that i written is not working.. Values are not getting overwritten

Here are the values which i am getting when i run the code

***Default***
Original Value: Chai, Current Value: Chai

***Values Before Reload***
Original Value: Chai, Current Value: Coffee

***LoadOption.OverwriteChanges;***
Original Value: Chai, Current Value: Coffee

Expected results are
***Default***
Original Value: Chai, Current Value: Chai

***Values Before Reload***
Original Value: Chai, Current Value: Coffee

***LoadOption.OverwriteChanges;***
Original Value: Chai, Current Value: Chai



Here is the code which i have written. i scratched my head almost 2hrs couln't get any answer.
Please let me know where i have done wrong..


protected void Page_Load(object sender, EventArgs e)
{
DataSet poductsDS = new DataSet();

string query = "Select ProductName, UnitPrice from Products";
string _conStr = System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString;

SqlDataAdapter da = new SqlDataAdapter(query,_conStr);

da.Fill(productsDS);

Display(productsDS, "Default");

//updating table filed values
DataRow row = productsDS.Tables[0].Rows[0];
row["ProductName"] = "Coffee";
Display(productsDS, "Values Before Reload");

//Reloading
SqlDataAdapter da2 = new SqlDataAdapter(query,_conStr);
da2.FillLoadOption = LoadOption.OverwriteChanges;
da2.Fill(productsDS);
Display(productsDS, "LoadOption.OverwriteChanges;");


}

private void Display(DataSet ds, string Heading)
{
Response.Write("***" + Heading + "***");
Response.Write("<br/>");

DataTable table = ds.Tables[0];
DataRow row = table.Rows[0];

Response.Write(string.Format("Original Value: {0}, Current Value: {1}", row[0, DataRowVersion.Original].ToString(), row[0, DataRowVersion.Current].ToString()));
Response.Write("<br/>");
Response.Write("<br/>");
}

Satish

modified on Sunday, October 4, 2009 5:09 AM

Questiondiv alignment Pin
benams3-Oct-09 21:39
benams3-Oct-09 21:39 
AnswerRe: div alignment Pin
Abhijit Jana3-Oct-09 22:07
professionalAbhijit Jana3-Oct-09 22:07 
AnswerRe: div alignment Pin
archit300030-Oct-09 2:36
archit300030-Oct-09 2:36 
QuestionAjax ModalPopup Pin
yadlaprasad3-Oct-09 21:33
yadlaprasad3-Oct-09 21:33 
AnswerRe: Ajax ModalPopup Pin
Muhammad Gouda4-Oct-09 0:05
Muhammad Gouda4-Oct-09 0:05 
GeneralRe: Ajax ModalPopup Pin
yadlaprasad4-Oct-09 21:02
yadlaprasad4-Oct-09 21:02 
QuestionLocalized Datagrid Sorting Pin
prasad.amara3-Oct-09 21:22
prasad.amara3-Oct-09 21:22 
Question[Message Deleted] Pin
dews turner3-Oct-09 20:44
dews turner3-Oct-09 20:44 
AnswerRe: 3-tier code generator for .net 2.0 Pin
Manas Bhardwaj3-Oct-09 23:12
professionalManas Bhardwaj3-Oct-09 23:12 
GeneralRe: 3-tier code generator for .net 2.0 Pin
Richard MacCutchan4-Oct-09 1:30
mveRichard MacCutchan4-Oct-09 1:30 
JokeRe: 3-tier code generator for .net 2.0 Pin
sashidhar4-Oct-09 2:20
sashidhar4-Oct-09 2:20 
AnswerRe: 3-tier code generator for .net 2.0 Pin
dews turner4-Oct-09 2:38
dews turner4-Oct-09 2:38 
GeneralRe: 3-tier code generator for .net 2.0 Pin
Abhijit Jana4-Oct-09 2:44
professionalAbhijit Jana4-Oct-09 2:44 
GeneralRe: 3-tier code generator for .net 2.0 Pin
sashidhar4-Oct-09 23:45
sashidhar4-Oct-09 23:45 
GeneralRe: 3-tier code generator for .net 2.0 Pin
Parwej Ahamad4-Oct-09 2:49
professionalParwej Ahamad4-Oct-09 2:49 
GeneralRe: 3-tier code generator for .net 2.0 Pin
dews turner4-Oct-09 2:57
dews turner4-Oct-09 2:57 
GeneralRe: 3-tier code generator for .net 2.0 Pin
Parwej Ahamad4-Oct-09 3:04
professionalParwej Ahamad4-Oct-09 3:04 

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.