asp + sql 問題
應用程式中發生伺服器錯誤。I don't know what is the problem.
public void Page_Load(Object sender, EventArgs E) {
String fileName = FileUpload1.PostedFile.FileName;
String desc1=desc.Value;
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" +
"User ID=Admin;Data Source='" +
Request.PhysicalApplicationPath +
"081023/test/file2/database/fileupload2.mdb';");
String sql = "insert into filedesc (file,desc) values (?,?)";
OleDbCommand cmd = new OleDbCommand(sql, conn);
cmd.Parameters.Add("@fileName", OleDbType.VarChar).Value = fileName;
cmd.Parameters.Add("@desc1", OleDbType.VarChar).Value = desc1;
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
} --------------------编程问答-------------------- 具体提示什么错误,贴出来
补充:.NET技术 , ASP.NET