The access database does not support ROW_NUMBER (). However, the code of the data operation layer generated by the dynamic software generator uses this method to retrieve the data list summarypublicDataSetGetListByPage (stringstrWhere, stringorderby, intstartIndex, intendIndex
The access database does not support ROW_NUMBER, however, the data operation layer code generated by the dynamic software generator has such a method // summary // retrieve the data list by PAGE /// summary public DataSet GetListByPage (string strWhere, string orderby, int startIndex, int endIndex
The access database does not support ROW_NUMBER (), but I use dynamic softGenerateToolGenerateData operation layerCodeThere is such a method
///
/// Retrieve the data list by PAGE
///
Public DataSet GetListByPage (string strWhere, string orderby, int startIndex, int endIndex)
{
StringBuilder strSql = new StringBuilder ();
StrSql. Append ("SELECT * FROM (");
StrSql. Append ("SELECT
ROW_NUMBER ()OVER (");
If (! String. IsNullOrEmpty (orderby. Trim ()))
{
StrSql. Append ("order by T." + orderby );
}
Else
{
StrSql. Append ("order by T. id desc ");
}
StrSql. Append (") AS Row, T. * from article_xh T ");
If (! String. IsNullOrEmpty (strWhere. Trim ()))
{
StrSql. Append ("WHERE" + strWhere );
}
StrSql. Append (") TT ");
StrSql. AppendFormat ("where tt. Row between {0} and {1}", startIndex, endIndex );
Return DbHelperOleDb. Query (strSql. ToString ());
}
In the access SQL view, I always test errors, prompts, syntax loss, and operator errors.
How can this problem be solved?