Click here to Skip to main content
15,921,295 members
Home / Discussions / C#
   

C#

 
GeneralRe: Tone generation on the fly Pin
PIEBALDconsult12-Jun-08 13:36
mvePIEBALDconsult12-Jun-08 13:36 
AnswerRe: Tone generation on the fly Pin
Anthony Mushrow12-Jun-08 13:56
professionalAnthony Mushrow12-Jun-08 13:56 
GeneralRe: Tone generation on the fly Pin
Klazen12-Jun-08 14:00
Klazen12-Jun-08 14:00 
GeneralRe: Tone generation on the fly Pin
PIEBALDconsult12-Jun-08 17:06
mvePIEBALDconsult12-Jun-08 17:06 
QuestionC# and the Icon Class Pin
Lea Hayes12-Jun-08 12:09
Lea Hayes12-Jun-08 12:09 
QuestionHow to Exract embedded files from RTF file? Pin
Anshuls12-Jun-08 10:50
Anshuls12-Jun-08 10:50 
AnswerRe: How to Exract embedded files from RTF file? Pin
Simon P Stevens12-Jun-08 23:10
Simon P Stevens12-Jun-08 23:10 
QuestionIdentity Column Problem(in TableAdapter.Update()) Pin
hdv21212-Jun-08 10:30
hdv21212-Jun-08 10:30 
hi after loading data into my dataTable object, i add new Identity Column to my dataTable for display Row Number, by this method :
private void InitIdentityColumn()
{
        if (this.dt.Columns.Contains("rowID"))
        {
                     this.dt.Columns.Remove("rowID");
        }
         
         DataColumn dc = new DataColumn("rowID");
         this.dt.Columns.Add(dc);

         int i = 0;
         foreach (DataRow row in this.dt.Rows)
         {
                    i += 1;
                    row["rowID"] = i;
         } 
}


but when i want to add row by this code :
FrmCategory frm = new FrmCategory(false, false);
DsStack.CategoriesRow newRow = this.dt.NewCategoriesRow();
Session.SaveInSession("newCategory", newRow);
if (frm.ShowDialog() == DialogResult.OK)
{   
    newRow = Session.LoadFromSession("newCategory") as DsStack.CategoriesRow;   
    this.dt.Rows.Add(newRow);   
    this.adapter.Update(this.dt); // error occured in this line
}


the following error has shown me :

Concurrency violation: the UpdateCommand affected 0 of the expected 1 records

but when i don't use InitIdentityColumn method, it was works good, my problem is that how to use InitIdentityColumn and prevent to occure this error, or how to create Identity Column by another way ? (without Row_Number() in sql server)
thanks.
QuestionConnecting C#.net with AS400 database Pin
Verghese12-Jun-08 8:44
Verghese12-Jun-08 8:44 
AnswerRe: Connecting C#.net with AS400 database Pin
Christian Graus12-Jun-08 8:46
protectorChristian Graus12-Jun-08 8:46 
GeneralRe: Connecting C#.net with AS400 database Pin
Verghese12-Jun-08 10:38
Verghese12-Jun-08 10:38 
QuestionPreview Panel Pin
tjschilling12-Jun-08 7:50
tjschilling12-Jun-08 7:50 
AnswerRe: Preview Panel Pin
Christian Graus12-Jun-08 8:08
protectorChristian Graus12-Jun-08 8:08 
GeneralRe: Preview Panel Pin
tjschilling12-Jun-08 8:19
tjschilling12-Jun-08 8:19 
GeneralRe: Preview Panel Pin
Christian Graus12-Jun-08 8:36
protectorChristian Graus12-Jun-08 8:36 
Question[C# 2.0]Rename file on FTP Pin
mcaos12-Jun-08 7:35
professionalmcaos12-Jun-08 7:35 
AnswerRe: [C# 2.0]Rename file on FTP Pin
Anthony Mushrow12-Jun-08 7:38
professionalAnthony Mushrow12-Jun-08 7:38 
AnswerRe: [C# 2.0]Rename file on FTP Pin
Giorgi Dalakishvili12-Jun-08 8:11
mentorGiorgi Dalakishvili12-Jun-08 8:11 
GeneralRe: [C# 2.0]Rename file on FTP Pin
mcaos12-Jun-08 10:50
professionalmcaos12-Jun-08 10:50 
QuestionEnter Valued in Combobox from database Pin
sam1287412-Jun-08 7:34
sam1287412-Jun-08 7:34 
AnswerRe: Enter Valued in Combobox from database Pin
Christian Graus12-Jun-08 7:40
protectorChristian Graus12-Jun-08 7:40 
GeneralRe: Enter Valued in Combobox from database Pin
sam1287412-Jun-08 8:18
sam1287412-Jun-08 8:18 
GeneralRe: Enter Valued in Combobox from database Pin
Christian Graus12-Jun-08 8:37
protectorChristian Graus12-Jun-08 8:37 
AnswerRe: Enter Valued in Combobox from database Pin
sam1287412-Jun-08 8:27
sam1287412-Jun-08 8:27 
GeneralRe: Enter Valued in Combobox from database Pin
Christian Graus12-Jun-08 8:37
protectorChristian Graus12-Jun-08 8:37 

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.