hello plesehelp me to sort out this problem
when i use the update command it doesn't work
coding is here tis is in c#
Code:
sqlconnection  con=new sqlconnection();
con.connectionstring="data source=server; initial catalog=db;user id=sa";
con.open();
sqlcommand cmd=new sqlcommand("select * from table1",con);
dataset sd=new dataset("table1");
sqldataadapter da=new sqldataadapter(cmd);
da.fill(ds,"table1");
datagrid dg=new datagrid();
dg.datasource=ds;
dg.datamember="table1";
da.update(ds,"table1");
con.close();
while i use this coding it shows exception ;
but when i take datagrid through wizard and establishe connection then update command is worked;. please some body help me .

Last edited by shabbir; 24Jun2007 at 15:06.. Reason: Code block - http://www.go4expert.com/forums/misc.php?do=bbcode#code