自动编号问题
id 是Access里的自动编号.下面代码哪有问题,为什么总是类型提示错误,就是按数据库自动编号相同的查询.select * from gonggao where id=??这里的问号怎么添
ID的页面传过来的
OleDbConnection conn=new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+Server.MapPath("mydata.mdb"));
OleDbCommand cmd=new OleDbCommand("select * from gonggao where id=@ID",conn);
conn.Open();
cmd.Parameters.Add(new OleDbParameter("@ID",OleDbType.BigInt));
cmd.Parameters["@ID"].Value=Convert.ToInt64(Request.Params["ID"]);
OleDbDataReader dr=cmd.ExecuteReader(CommandBehavior.CloseConnection);
dr.Read();
this.txttitle.Text=dr["title"].ToString();
this.txtshow.Text=dr["show"].ToString();