예제 #1
0
 public DataSet QueryDataSet(string cmdText, string tblName)
 {
     try
     {
         DataSet ds = new DataSet();
         if (tblName != string.Empty)
         {
             ds = _AdoTemplate.DataSetCreate(CommandType.Text, cmdText, new string[] { tblName });
         }
         else
         {
             ds = _AdoTemplate.DataSetCreate(CommandType.Text, cmdText);
         }
         return(ds);
     }
     catch (Exception e)
     {
         dsExceptionHandler.HandleException(e);
         ReConnection(e);
         throw e;// new Goodway.CommonModel.Exception.DbException(DbResult.SqlError, e.Message ?? "" + Environment.NewLine + e.StackTrace ?? "", cmdText);
     }
 }
예제 #2
0
 public DataSet Get(string name)
 {
     return(AdoTemplate.DataSetCreate(CommandType.Text,
                                      string.Format("SELECT * FROM UserTable WHERE UserName = '******'", name)));
 }
예제 #3
0
 public DataSet GetCustomers(string dataSetName)
 {
     return(AdoTemplate.DataSetCreate(CommandType.Text, selectAll, new string[] { dataSetName }));
 }
예제 #4
0
 /// <summary>
 /// 执行sql语句
 /// </summary>
 /// <param name="cType">执行类型</param>
 /// <param name="sql">sql语句</param>
 /// <returns>结果集DataSet</returns>
 public DataSet ExecteSqlGetDataSet(CommandType cType, string sql)
 {
     return(AdoTemplate.DataSetCreate(CommandType.Text, sql));
 }
예제 #5
0
 public DataSet GetCustomers()
 {
     return(AdoTemplate.DataSetCreate(CommandType.Text, selectAll));
 }