新人弱智的问一下??? 如何得到选中行及该行的列:http://topic.csdn.net/t/20020108/00/463396.html插入数据库不用说了吧~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 for example:SqlConnection con=new SqlConnection("server=.;database=student;uid=sa;pwd=0421");SqlCommand cmd=new SqlCommand("insert into studentDetails values(@Sno,@Sname)",con);cmd.Parameters.AddWithValue("@Sno",this.DataGrid1[CurrentRowIndex][0].ToString());cmd.Parameters.AddWithValue("@Sname",this.DataGrid1[CurrentRowIndex][1].ToString());con.Open();cmd.ExecuteNonQuery();con.Close();大致这样.. 给datagrid的每一行添加一个ondbclick事件,当双击datagrid时,获取选中行的ID(主键),再从数据库里读出这条数据插入另一张表中,你can try! 关于此功能的实现 用TTS实现发声,出现COM组件错误。 急!!!!!!!!!!!有关打开文件路径的2个问题 想开发一个在公网上用的通讯系统,用MSN?还是socket自己写? C/s下如何在一个窗体中操作另一个窗体的控件? datagrid怎么判断行的状态?? rdlc里的折线显示不出来,急!!!! 看看我对lock的理解对不对? textbox读取问题 请教C#高手,使用C#是否可以实现对象的移动(A主机—>B主机),来者有分。 装不起VS.net,,,想问一下哪里能下载到里面的帮助文档??? Remoting中lock出错
SqlCommand cmd=new SqlCommand("insert into studentDetails values(@Sno,@Sname)",con);
cmd.Parameters.AddWithValue("@Sno",this.DataGrid1[CurrentRowIndex][0].ToString());
cmd.Parameters.AddWithValue("@Sname",this.DataGrid1[CurrentRowIndex][1].ToString());
con.Open();
cmd.ExecuteNonQuery();
con.Close();大致这样..