从页面选择要插入的数据导数据库,第一次插入时选择多少条都能插入到数据库。但第二次把选择的数据插入时,不管你选择了多少条,数据库里始终之插入一条。为什么?(这里不考虑数据的重复)谢谢先。
解决方案 »
- asp.net 如何psot用户名密码到UUCALL实现psot登录
- 急!!!如何定位gridview中的下拉框!!!
- 关于Excel 上传到服务器,再导入数据库的问题!
- 分页基类创建
- datalist的问题(在线急等,解决立即给分)
- 急,帮忙解决日期格式化的问题,马上结贴!
- 在线急,在datagrid中添加其他控件
- .net操纵Excel的问题,请帮忙
- 菜鸟求asp.net2.0下实现图片跑马灯功能
- 为什么TreeView1.getTreeNode("0"),可以,但i=0,TreeView1.getTreeNode(i)不行,需要什么样的转换
- ASP.NET上传的问题!!
- .NET下调用MySql的存储过程出现错误,哪条大牛能解?
private void insertPhoto(string path)
{
string connectString;
connectString = Framework.GlobalModule.MainConnectionString;
SqlConnection conn = new SqlConnection(connectString);
conn.Open();
string ssql = "insert into questionphoto(PhotoPath,EmployeeID,employeeName) select P_PhotoShort,P_AddUserID,AdminUser.aur_EmployeeName from BlogPhoto,AdminUser where P_PhotoShort='" + path.Trim() + "'and BlogPhoto.P_adduserID=AdminUser.aur_employeeID";
//string ssql = "insert into questionphoto(PhotoPath,EmployeeID) select P_PhotoShort,P_AddUserID from BlogPhoto where P_PhotoShort='" + path.Trim() + "'";
SqlCommand comm=new SqlCommand(ssql,conn);
comm.ExecuteNonQuery();
conn.Close();
}
{
if(!IsPostBack) insertPhoto();
}