资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.OleDb;
using System.Windows.Forms;

namespace _34芮剑波__StudentScore
{
    class DataAccess
    {
        private string strDSN;

        OleDbConnection oledbCon;

        public void dataCon()
        {
            strDSN = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=“ + Application.StartupPath.ToString() + “\\student.accdb“;
            oledbCon = new OleDbConnection(strDSN);
        }

        public DataSet getDataset(string sql)
        {
            DataSet ds = new DataSet();
            oledbCon.Open();
            try
            {
                OleDbCommand oledbCom = new OleDbCommand(sql oledbCon);
                OleDbDataAdapter oledbDa = new OleDbDataAdapter(oledbCom);
                oledbDa.Fill(ds);
                return ds;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
            finally
            {
                oledbCon.Close();
            }
        }

        public bool sqlExec(string sql)
        {
            try
            {
                oledbCon.Open();
            }
            catch
            {
                MessageBox.Show(“数据库未连接“);
            }
            try
            {
                OleDbCommand oledbCom = new OleDbCommand(sql oledbCon);
                oledbCom.ExecuteNonQuery();
                return true;
            }
            catch(Exception ex)
            {
                MessageBox.Show(ex.Message“提示“);
                return false;
            }
            finally
            {
                oledbCon.Close();
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     86016  2021-01-09 12:29  34芮剑波  StudentScore\.vs\34芮剑波  StudentScore\v14\.suo

     文件       7657  2020-12-22 11:06  34芮剑波  StudentScore\34芮剑波  StudentScore\34芮剑波  StudentScore.csproj

     文件        189  2020-12-21 20:39  34芮剑波  StudentScore\34芮剑波  StudentScore\App.config

     文件      99328  2020-12-29 11:22  34芮剑波  StudentScore\34芮剑波  StudentScore\bin\Debug\34芮剑波  StudentScore.exe

     文件        189  2020-12-21 20:39  34芮剑波  StudentScore\34芮剑波  StudentScore\bin\Debug\34芮剑波  StudentScore.exe.config

     文件      83456  2020-12-29 11:22  34芮剑波  StudentScore\34芮剑波  StudentScore\bin\Debug\34芮剑波  StudentScore.pdb

     文件      22696  2021-01-09 12:28  34芮剑波  StudentScore\34芮剑波  StudentScore\bin\Debug\34芮剑波  StudentScore.vshost.exe

     文件        189  2020-12-21 20:39  34芮剑波  StudentScore\34芮剑波  StudentScore\bin\Debug\34芮剑波  StudentScore.vshost.exe.config

     文件        490  2019-03-19 12:46  34芮剑波  StudentScore\34芮剑波  StudentScore\bin\Debug\34芮剑波  StudentScore.vshost.exe.manifest

     文件     643072  2020-12-29 11:23  34芮剑波  StudentScore\34芮剑波  StudentScore\bin\Debug\Student.accdb

     文件       1874  2020-12-29 11:02  34芮剑波  StudentScore\34芮剑波  StudentScore\DataAccess.cs

     文件        413  2020-12-22 08:15  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAbout.cs

     文件       1508  2020-12-22 08:15  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAbout.Designer.cs

     文件       5817  2020-12-22 08:15  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAbout.resx

     文件       1098  2020-12-29 11:22  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddCourse.cs

     文件       7348  2020-12-29 11:18  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddCourse.Designer.cs

     文件       5817  2020-12-29 11:18  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddCourse.resx

     文件       1081  2020-12-30 12:53  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddScore.cs

     文件       9621  2020-12-29 11:18  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddScore.Designer.cs

     文件       5817  2020-12-29 11:18  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddScore.resx

     文件       1274  2020-12-29 11:10  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddStu.cs

     文件      10743  2020-12-29 11:08  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddStu.Designer.cs

     文件       5817  2020-12-29 11:08  34芮剑波  StudentScore\34芮剑波  StudentScore\frmAddStu.resx

     文件       1499  2020-12-29 17:30  34芮剑波  StudentScore\34芮剑波  StudentScore\frmEditCourse.cs

     文件       6479  2020-12-29 17:30  34芮剑波  StudentScore\34芮剑波  StudentScore\frmEditCourse.Designer.cs

     文件       5817  2020-12-29 17:30  34芮剑波  StudentScore\34芮剑波  StudentScore\frmEditCourse.resx

     文件       1677  2020-12-29 17:18  34芮剑波  StudentScore\34芮剑波  StudentScore\frmEditStu.cs

     文件      12162  2020-12-29 17:18  34芮剑波  StudentScore\34芮剑波  StudentScore\frmEditStu.Designer.cs

     文件       5817  2020-12-29 17:18  34芮剑波  StudentScore\34芮剑波  StudentScore\frmEditStu.resx

     文件       1744  2021-01-01 19:37  34芮剑波  StudentScore\34芮剑波  StudentScore\frmLogin.cs

............此处省略65个文件信息

评论

共有 条评论