zoukankan      html  css  js  c++  java
  • PetaPoco支持OleDb

    修改DBType,增加OleDb。

    enum DBType
    {
        OleDb,
        SqlServer,
        SqlServerCE,
        MySql,
        PostgreSQL,
        Oracle,
        SQLite
    }
    

    修改CommonConstruct,增加if (dbtype.StartsWith("OleDb")) _dbType = DBType.OleDb;

    private void CommonConstruct()
    {
        if (dbtype.StartsWith("OleDb")) _dbType = DBType.OleDb;
        else if (dbtype.StartsWith("MySql")) _dbType = DBType.MySql;
        else if (dbtype.StartsWith("SqlCe")) _dbType = DBType.SqlServerCE;
        else if (dbtype.StartsWith("Npgsql")) _dbType = DBType.PostgreSQL;
        else if (dbtype.StartsWith("Oracle")) _dbType = DBType.Oracle;
        else if (dbtype.StartsWith("SQLite")) _dbType = DBType.SQLite;
        else if (dbtype.StartsWith("System.Data.SqlClient.")) _dbType = DBType.SqlServer;
    }
    

    调用:

    Dim db As Database = New Database(cs, "System.Data.OleDb")
    

      

  • 相关阅读:
    零碎知识点
    安卓内存泄漏8种可能
    检测内存泄漏
    kotlin协程
    webview
    安卓各布局优缺点
    splice方法
    angular服务使用
    CSS3的一些笔记
    let、var、const
  • 原文地址:https://www.cnblogs.com/tulife/p/2750886.html
Copyright © 2011-2022 走看看