Click here to Skip to main content
15,896,288 members
Home / Discussions / C#
   

C#

 
GeneralRe: removing the last character of textbox Pin
NarendraSinghJTV6-Oct-09 18:18
NarendraSinghJTV6-Oct-09 18:18 
GeneralRe: removing the last character of textbox Pin
NarendraSinghJTV8-Oct-09 23:59
NarendraSinghJTV8-Oct-09 23:59 
QuestionPointer in C# .NET (in Express2008) Pin
det55-Oct-09 18:08
det55-Oct-09 18:08 
AnswerRe: Pointer in C# .NET (in Express2008) Pin
Christian Graus5-Oct-09 18:24
protectorChristian Graus5-Oct-09 18:24 
AnswerRe: Pointer in C# .NET (in Express2008) Pin
stancrm5-Oct-09 18:36
stancrm5-Oct-09 18:36 
QuestionHow to read table from MS_WORD using C# Pin
Yognand5-Oct-09 18:04
Yognand5-Oct-09 18:04 
AnswerRe: How to read table from MS_WORD using C# Pin
Christian Graus5-Oct-09 18:25
protectorChristian Graus5-Oct-09 18:25 
Questionwhy do Update method of SqldataAdapter not work? Pin
Nguyen Hong Lam5-Oct-09 17:55
Nguyen Hong Lam5-Oct-09 17:55 
This is my coding, DeleteComand and InsertComand work, but UpdateComand not work, if change dap.AcceptChangesDuringFill is true, then UpdateComand work, but Delete and Insert not work, please help me to solve this problem as impossible as

DataSet dsLocal = new DataSet();
DataSet dsServer = scsiClass.getDS("SELECT * FROM [t_HR_Group]", "t_HR_Group");

SqlDataAdapter dap = new SqlDataAdapter("SELECT * FROM [t_HR_Group1]", con);
dap.MissingSchemaAction = MissingSchemaAction.AddWithKey;
dap.AcceptChangesDuringFill = false;

dap.UpdateCommand = cmd.GetUpdateCommand();
dap.DeleteCommand = cmd.GetDeleteCommand();
dap.InsertCommand = cmd.GetInsertCommand();

dap.Fill(dsLocal, "t_HR_Group");
SqlCommandBuilder cmd = new SqlCommandBuilder(dap);

dsServer.Merge(dsLocal, true, MissingSchemaAction.AddWithKey);
//dsServer.GetChanges();

int cn = dsServer.Tables[0].Rows.Count - 1;
for (int i = 0; i <= cn; i++)
{
DataRow dr = dsServer.Tables[0].Rows[i];
if (dr.RowState == DataRowState.Unchanged)
{
dr.SetAdded();
}
else
if (dr.RowState == DataRowState.Added)
{
dr.AcceptChanges();
dr.Delete();
}
}


int eff=dap.Update(dsServer.Tables[0]);
AnswerRe: why do Update method of SqldataAdapter not work? Pin
Christian Graus5-Oct-09 18:25
protectorChristian Graus5-Oct-09 18:25 
GeneralRe: why do Update method of SqldataAdapter not work? Pin
PIEBALDconsult6-Oct-09 5:00
mvePIEBALDconsult6-Oct-09 5:00 
QuestionMRU Button List in C# Pin
Alisaunder5-Oct-09 17:54
Alisaunder5-Oct-09 17:54 
AnswerRe: MRU Button List in C# Pin
Christian Graus5-Oct-09 18:26
protectorChristian Graus5-Oct-09 18:26 
GeneralRe: MRU Button List in C# Pin
Alisaunder6-Oct-09 3:45
Alisaunder6-Oct-09 3:45 
GeneralRe: MRU Button List in C# Pin
Alisaunder6-Oct-09 7:42
Alisaunder6-Oct-09 7:42 
QuestionDownloadable C# Tutorials??? Pin
TGeist5-Oct-09 17:35
TGeist5-Oct-09 17:35 
AnswerRe: Downloadable C# Tutorials??? Pin
Luc Pattyn5-Oct-09 17:41
sitebuilderLuc Pattyn5-Oct-09 17:41 
AnswerRe: Downloadable C# Tutorials??? Pin
kideve5-Oct-09 17:57
kideve5-Oct-09 17:57 
QuestionConvert Access App To C# Pin
Kevin Marois5-Oct-09 16:15
professionalKevin Marois5-Oct-09 16:15 
AnswerRe: Convert Access App To C# Pin
N a v a n e e t h5-Oct-09 17:14
N a v a n e e t h5-Oct-09 17:14 
GeneralRe: Convert Access App To C# Pin
Kevin Marois5-Oct-09 17:30
professionalKevin Marois5-Oct-09 17:30 
AnswerRe: Convert Access App To C# Pin
kideve5-Oct-09 17:55
kideve5-Oct-09 17:55 
AnswerRe: Convert Access App To C# Pin
riced6-Oct-09 3:38
riced6-Oct-09 3:38 
GeneralRe: Convert Access App To C# Pin
Kevin Marois6-Oct-09 5:39
professionalKevin Marois6-Oct-09 5:39 
GeneralRe: Convert Access App To C# Pin
Eddy Vluggen6-Oct-09 8:38
professionalEddy Vluggen6-Oct-09 8:38 
QuestionUpdate Typed DataSet Pin
tamir9015-Oct-09 11:42
tamir9015-Oct-09 11:42 

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.