insert into table2 (strUserNO) select strUserNO from table1 where strUserName = comboBox1.Text
insert into table2 (strUserNO) values ( select strUserNO from table1 where strUserName = comboBox1.Text)注意如果在程序中应该用应该写成: string sql="insert into table2 (strUserNO) values ( select strUserNO from table1 where strUserName ='"+comboBox1.Text+"')";
意如果在程序中应该用应该写成: string sql="insert into table2 (strUserNO) values ( select strUserNO from table1 where strUserName ='"+comboBox1.Text+"')";如果table1的strUserName列有多个相同的值怎么办???
{
comboBox1.DataSource = dataSet1.Tables["table1"];
comboBox1.DisplayMember = "strUserName";
}
是form application还是web application?
请问redwolf_123(雨恨云愁)
选择后点令一提交按钮后要把所选内容对应的strUserNO写到令一表中
需要加一句什么代码啊?
select strUserNO from table1 where strUserName = comboBox1.Text
select strUserNO from table1 where strUserName = comboBox1.Text)注意如果在程序中应该用应该写成:
string sql="insert into table2 (strUserNO) values (
select strUserNO from table1 where strUserName ='"+comboBox1.Text+"')";
string sql="insert into table2 (strUserNO) values (
select strUserNO from table1 where strUserName ='"+comboBox1.Text+"')";如果table1的strUserName列有多个相同的值怎么办???
Combobox1.DisplayMember= 列名
Combobox1.ValueMember = 列名