日期:2014-05-17 浏览次数:20531 次
private static string connectionString = "Data Source=XDXDB;User Id=xudx;Password=xdx;Integrated Security=no";
/// <summary>
/// 获的总页数
/// </summary>
/// <returns></returns>
private object GetPageCount()
{
string sqlstr = "select COUNT(*) from customer_sign";
using (OracleConnection conn = new OracleConnection(connectionString))
{
conn.Open();
using (OracleCommand cmd = new OracleCommand(sqlstr, conn))
{
return cmd.ExecuteOracleScalar();
}
}
}
<connectionStrings>
<add name="xxx" connectionString="Data Source=xxx;User ID=xxx;Password=xxx"/>