new SqlParameter()在括号中可不可写多个参数new SqlParameter(@name,name)我的意思是在括号里面能不能多写几个参数, SqlDataReader reader = SqlHelp.GetReader(sql, new SqlParameter("@Subject,@Receiver", subject+receiver ));
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/06 05:52:50
new SqlParameter()在括号中可不可写多个参数new SqlParameter(@name,name)我的意思是在括号里面能不能多写几个参数, SqlDataReader reader = SqlHelp.GetReader(sql, new SqlParameter("@Subject,@Receiver", subject+receiver ));
new SqlParameter()在括号中可不可写多个参数
new SqlParameter(@name,name)我的意思是在括号里面能不能多写几个参数,
SqlDataReader reader = SqlHelp.GetReader(sql, new SqlParameter("@Subject,@Receiver", subject+receiver ));这样写好使吗,请高人帮我改一下
new SqlParameter()在括号中可不可写多个参数new SqlParameter(@name,name)我的意思是在括号里面能不能多写几个参数, SqlDataReader reader = SqlHelp.GetReader(sql, new SqlParameter("@Subject,@Receiver", subject+receiver ));
不能这么写的,必须一个个写出来
SqlDataReader reader = SqlHelp.GetReader(sql,new SqlParameter("@Subject",subject),new SqlParameter("@Receiver",receiver));
不论是多少个,思路都是这样
要么就定义一个SqlParameter类型的数组,把元素加进去
然后传数组做参数