asp做 .net 链接access 总报溢出错误。请教。
string database = "E:\\YXY\\Solution1\\FirstPro.accdb";
OleDbConnection con = new OleDbConnection(string.Format("ProVider=Microsoft.Ace.OLEDB.12.0;Data Source={0}", database));
con.Open();
OleDbCommand comd = con.CreateCommand();
comd.CommandText = "insert into tablefirst([shangpin],[amount],[personname],[adress],[zipcode],[telephone],[payway],[time],[fuyan])values('" + spName.Trim() + "','" + txtamount.Text + "','" + txtperson.Text + "','" + txtadress.Text + "','" + txtzipcode.Text + "','" + txttelephone.Text + "','" + spPayway + "','" + spTime + "','" + txtfuyan.Text.Trim() + "')";
object b = comd.ExecuteNonQuery();
con.Close();
int g = 0;
g = int.Parse(b.ToString());
if (g > 0)
{ Page.ClientScript.RegisterStartupScript(this.GetType(),"", "<script language='javascript' defer>alert('添加成功');window.parent.location.herf='../Default.aspx';</script>"); }
string database = "E:\\YXY\\Solution1\\FirstPro.accdb";
OleDbConnection con = new OleDbConnection(string.Format("ProVider=Microsoft.Ace.OLEDB.12.0;Data Source={0}", database));
con.Open();
OleDbCommand comd = con.CreateCommand();
comd.CommandText = "insert into tablefirst([shangpin],[amount],[personname],[adress],[zipcode],[telephone],[payway],[time],[fuyan])values('" + spName.Trim() + "','" + txtamount.Text + "','" + txtperson.Text + "','" + txtadress.Text + "','" + txtzipcode.Text + "','" + txttelephone.Text + "','" + spPayway + "','" + spTime + "','" + txtfuyan.Text.Trim() + "')";
object b = comd.ExecuteNonQuery();
con.Close();
int g = 0;
g = int.Parse(b.ToString());
if (g > 0)
{ Page.ClientScript.RegisterStartupScript(this.GetType(),"", "<script language='javascript' defer>alert('添加成功');window.parent.location.herf='../Default.aspx';</script>"); }
解决方案 »
- asp.net文件流下载各种下载工具失败的问题
- linq select new 问题
- 分页存储过程数据库中有数据库,程序中调用为空
- gridView如何才能只传给某一行参数?
- Request.UserHostAddress为什么总是返回服务器的IP地址
- VS2005中在WEB窗体下怎么添加Page的事件
- 为什么第二次进入页面也执行IsPostBack==false里的代码啊?
- 请教c#中CheckBox的用法?
- 关于IIS上配置下载文件大小的问题
- 我想让button服务器控件先执行客户端代码再提交,如果实现?
- 100分求解决:datagridview打开Excel报错:名为“ClampVal”的列已属于此 DataTable。
- 字段状态标示的表示
还有不知道LZ时间字段 中的那个sptime是什么类型,access中的时间要以string的形式插入的