OleDbDataAdapter 至少有一个参数没有指定
OleDbConnection OldConn = new OleDbConnection(连接字符串);
OldConn.Open();
DataSet Ds = new DataSet( "BBSList ");
string CommandText = "SELECT TOP 10 BBSLIst ORDER BY BBSID DESC; ";
OleDbDataAdapter OldDap = new OleDbDataAdapter(CommandText, OldConn);
OldDap.Fill(Ds, "BBSList ");
OldConn.Close();
为什么上面的语句出错。。说我至少有一个参数没有指定!
------解决方案--------------------OleDbConnection OldConn = new OleDbConnection(连接字符串);
OldConn.Open();
DataSet Ds = new DataSet();
string CommandText = "SELECT TOP 10 BBSLIst ORDER BY BBSID DESC; ";
OleDbDataAdapter OldDap = new OleDbDataAdapter(CommandText, OldConn);
OldDap.Fill(Ds, "BBSList ");
OldConn.Close();