C
clonesea
Unregistered / Unconfirmed
GUEST, unregistred user!
<script Language="C#" runat="server">
void Page_Load(Object sender,EventArgs e)
{
string newsid = Request.Params["n_id"];
// 创建连接对象
OleDbConnection Conn=new OleDbConnection();
// 设置连接字符串
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;"+
"Data Source="+Server.MapPath("/databank/achievement.mdb");
Conn.Open();
string strCom= "SELECT n_title ,n_author ,n_content,n_time FROM news where n_id="+newsid;
OleDbDataAdapter Comm=new OleDbDataAdapter(strCom,Conn);
DataSet ds=new DataSet();
Comm.Fill(ds,"news");
DataRow dr= ds.Tables["news"].Rows[0];
Conn.Close();
}
帮忙看看怎么 dr不存在呢?
void Page_Load(Object sender,EventArgs e)
{
string newsid = Request.Params["n_id"];
// 创建连接对象
OleDbConnection Conn=new OleDbConnection();
// 设置连接字符串
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;"+
"Data Source="+Server.MapPath("/databank/achievement.mdb");
Conn.Open();
string strCom= "SELECT n_title ,n_author ,n_content,n_time FROM news where n_id="+newsid;
OleDbDataAdapter Comm=new OleDbDataAdapter(strCom,Conn);
DataSet ds=new DataSet();
Comm.Fill(ds,"news");
DataRow dr= ds.Tables["news"].Rows[0];
Conn.Close();
}
帮忙看看怎么 dr不存在呢?