コード例 #1
0
        // option:
        //  0 - odbc connection
        //  1 - oledb connection
        public DbContext(string dbFileName, int option = 0)
        {
            if (option == 0)
                _adapter = new OdbcAdapter(dbFileName);
            else
                _adapter = new OleDbAdapter(dbFileName);

            _connection = _adapter.NewConnection();
        }
コード例 #2
0
ファイル: DbContext.cs プロジェクト: linxy5326/iS3-Desktop
        // option:
        //  0 - odbc connection
        //  1 - oledb connection
        public DbContext(string dbFileName, int option = 0)
        {
            if (option == 0)
            {
                _adapter = new OdbcAdapter(dbFileName);
            }
            else
            {
                _adapter = new OleDbAdapter(dbFileName);
            }

            _connection = _adapter.NewConnection();
        }