Example #1
0
 public static DataSet getShenghuaXueChangGuiForYLH(string strSQL, string shpath)
 {
     try
     {
         DataSet ds     = new DataSet();
         string  strcon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" + shpath + "";
         ds = DbHelperAccess.Query(strSQL, strcon);
         return(ds);
     }
     catch (Exception r)
     {
         return(null);
     }
 }
Example #2
0
        public static DataSet GetDataForAccess(string s, string top, string tdb, out string err)
        {
            err = "";
            DataSet ds = null;

            try
            {
                string sql = "select * from " + tdb + s;
                if (top != "")
                {
                    sql = "select top " + top + " * from " + tdb + s;
                }
                ds = DbHelperAccess.Query(sql);
            }
            catch (Exception e)
            {
                err = e.Message;
            }
            return(ds);
        }