TableAdapter.Update() : One down, how many to go ?

aw48

Active member
Joined
Feb 9, 2013
Messages
36
Location
Germany
Programming Experience
10+
hi again,

here is my code :

int n = dsCfg.tblCfg.Columns.Count;

Object[] ao = new object[n];

ao[0] = "SETTINGS";
ao[1] = 0;
ao[2] = some value

dsCfg.tblCfg.LoadDataRow(ao,false);
taCfg.Update(dsCfg.tblCfg); -> throws exception : cannot insert duplicate PRIMARY KEY

tblCfg has 6 columns : 0=nchar(10), 1=int, all others are type sqlvariant; 0 and 1 build PRIMARY KEY

so if it can't insert why doesn't it up ?
any help (except try this... (means i don't want to rewrite the project)) appreciated

thanks in advance
 
Last edited:
Back
Top Bottom