asp.net关于文件在数据库的存入和读取
rSQL += "''" + strUnitName + "'',"; 184 strSQL += "''" + strTmpUserName + "'',"; 185 strSQL += "''" + strDept + "'',"; 186 strSQL += "''" + strUserName + "'',"; 187 strSQL += "''" + strClientFileIndex + "'')"; 188 cmd = new SqlCommand(strSQL, connClient); 189 cmd.Connection.Open(); 190 cmd.ExecuteNonQuery(); 191 cmd.Connection.Close(); 192 193 String strTmpServerFileIndex = strServerFileIndex.Remove(strServerFileIndex.Length - 1); 194 195 strSQL = "Insert Into Group_Email_Sever (Title,Content,Area,SendToUser,Dept,Sender,Files_Index)"; 196 strSQL += " values ("; 197 strSQL += "''" + strTitle + "'',"; 198 strSQL += "''" + strContent + "'',"; 199 strSQL += "''" + strAreaName + "'',"; 200 strSQL += "''" + strTmpUserName + "'',"; 201 strSQL += "''" + strTmpDept + "'',"; 202 strSQL += "''" + strUserName + "'',"; 203 strSQL += "''" + strTmpServerFileIndex + "'')"; 204 cmd = new SqlCommand(strSQL, conn); 205 cmd.Connection.Open(); 206 cmd.ExecuteNonQuery(); 207 cmd.Connection.Close(); 208 } 209 /**/////////潤崩貧勧謹現周///////////// 210 Response.Redirect("../SuccessMsg.aspx"); 211 } 212} 213 下载文件的代码: DownFile.aspx
|
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |