亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sqliteconnection.cs

?? sqlite 3.3.8 支持加密的版本
?? CS
?? 第 1 頁 / 共 5 頁
字號:
    /// <summary>
    /// Manual distributed transaction enlistment support
    /// </summary>
    /// <param name="transaction">The distributed transaction to enlist in</param>
    public override void EnlistTransaction(System.Transactions.Transaction transaction)
    {
      if (_transactionLevel > 0 && transaction != null)
        throw new ArgumentException("Unable to enlist in transaction, a local transaction already exists");

      if (_enlistment != null && transaction != _enlistment._scope)
        throw new ArgumentException("Already enlisted in a transaction");

      _enlistment = new SQLiteEnlistment(this, transaction);
    }
#endif

    /// <summary>
    /// Looks for a key in the array of key/values of the parameter string.  If not found, return the specified default value
    /// </summary>
    /// <param name="opts">The Key/Value pair array to look in</param>
    /// <param name="key">The key to find</param>
    /// <param name="defValue">The default value to return if the key is not found</param>
    /// <returns>The value corresponding to the specified key, or the default value if not found.</returns>
    static internal string FindKey(KeyValuePair<string, string>[] opts, string key, string defValue)
    {
      int x = opts.Length;
      for (int n = 0; n < x; n++)
      {
        if (String.Compare(opts[n].Key, key, true, CultureInfo.InvariantCulture) == 0)
        {
          return opts[n].Value;
        }
      }
      return defValue;
    }

    /// <summary>
    /// Opens the connection using the parameters found in the <see cref="ConnectionString">ConnectionString</see>
    /// </summary>
    public override void Open()
    {
      if (_connectionState != ConnectionState.Closed)
        throw new InvalidOperationException();

      Close();

      KeyValuePair<string, string>[] opts = ParseConnectionString();
      string fileName;

      if (Convert.ToInt32(FindKey(opts, "Version", "3"), CultureInfo.InvariantCulture) != 3)
        throw new NotSupportedException("Only SQLite Version 3 is supported at this time");

      fileName = FindKey(opts, "Data Source", "");

      if (String.IsNullOrEmpty(fileName))
        throw new ArgumentException("Data Source cannot be empty.  Use :memory: to open an in-memory database");

      if (String.Compare(fileName, ":MEMORY:", true, CultureInfo.InvariantCulture) == 0)
        fileName = ":memory:";
#if PLATFORM_COMPACTFRAMEWORK
      else if (fileName.StartsWith(".\\"))
        fileName = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().GetName().CodeBase) + fileName.Substring(1);
#endif
      try
      {
        bool bUTF16 = (Convert.ToBoolean(FindKey(opts, "UseUTF16Encoding", "False"), CultureInfo.InvariantCulture) == true);
        SQLiteDateFormats dateFormat = String.Compare(FindKey(opts, "DateTimeFormat", "ISO8601"), "ticks", true, CultureInfo.InvariantCulture) == 0 ? SQLiteDateFormats.Ticks : SQLiteDateFormats.ISO8601;

        if (bUTF16) // SQLite automatically sets the encoding of the database to UTF16 if called from sqlite3_open16()
          _sql = new SQLite3_UTF16(dateFormat);
        else
          _sql = new SQLite3(dateFormat);

        fileName = ExpandFileName(fileName);

        try
        {
          if (IO.File.Exists(fileName) == false)
            throw new IO.FileNotFoundException(String.Format(CultureInfo.CurrentCulture, "Unable to locate file \"{0}\", creating new database.", fileName));
        }
        catch
        {
        }

        _sql.Open(fileName);

        _binaryGuid = (Convert.ToBoolean(FindKey(opts, "BinaryGUID", "True"), CultureInfo.InvariantCulture) == true);

        string password = FindKey(opts, "Password", null);

        if (String.IsNullOrEmpty(password) == false)
          _sql.SetPassword(System.Text.UTF8Encoding.UTF8.GetBytes(password));
        else if (_password != null)
          _sql.SetPassword(_password);
        _password = null;

        _dataSource = System.IO.Path.GetFileNameWithoutExtension(fileName);

        OnStateChange(ConnectionState.Open);
        _version++;

        using (SQLiteCommand cmd = CreateCommand())
        {
          string defValue;

          defValue = FindKey(opts, "Synchronous", "Normal");
          if (String.Compare(defValue, "Normal", true, CultureInfo.InvariantCulture) != 0)
          {
            cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA Synchronous={0}", defValue);
            cmd.ExecuteNonQuery();
          }

          defValue = FindKey(opts, "Cache Size", "2000");
          if (Convert.ToInt32(defValue) != 2000)
          {
            cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA Cache_Size={0}", defValue);
            cmd.ExecuteNonQuery();
          }

          if (fileName != ":memory:")
          {
            defValue = FindKey(opts, "Page Size", "1024");
            if (Convert.ToInt32(defValue) != 1024)
            {
              cmd.CommandText = String.Format(CultureInfo.InvariantCulture, "PRAGMA Page_Size={0}", defValue);
              cmd.ExecuteNonQuery();
            }
          }
        }

#if !PLATFORM_COMPACTFRAMEWORK
        if (FindKey(opts, "Enlist", "Y").ToUpper()[0] == 'Y' && Transactions.Transaction.Current != null)
          EnlistTransaction(Transactions.Transaction.Current);
#endif
      }
      catch (SQLiteException)
      {
        OnStateChange(ConnectionState.Broken);
        throw;
      }
    }

    /// <summary>
    /// Returns the version of the underlying SQLite database engine
    /// </summary>
#if !PLATFORM_COMPACTFRAMEWORK
    [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
#endif
    public override string ServerVersion
    {
      get
      {
        if (_connectionState != ConnectionState.Open)
          throw new InvalidOperationException();

        return _sql.Version;
      }
    }

    /// <summary>
    /// Returns the state of the connection.
    /// </summary>
#if !PLATFORM_COMPACTFRAMEWORK
    [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
#endif
    public override ConnectionState State
    {
      get
      {
        return _connectionState;
      }
    }

    /// <summary>
    /// Change the password (or assign a password) to an open database.
    /// </summary>
    /// <remarks>
    /// No readers or writers may be active for this process.  The database must already be open
    /// and if it already was password protected, the existing password must already have been supplied.
    /// </remarks>
    /// <param name="newPassword">The new password to assign to the database</param>
    public void ChangePassword(string newPassword)
    {
      ChangePassword(String.IsNullOrEmpty(newPassword) ? null : System.Text.UTF8Encoding.UTF8.GetBytes(newPassword));
    }

    /// <summary>
    /// Change the password (or assign a password) to an open database.
    /// </summary>
    /// <remarks>
    /// No readers or writers may be active for this process.  The database must already be open
    /// and if it already was password protected, the existing password must already have been supplied.
    /// </remarks>
    /// <param name="newPassword">The new password to assign to the database</param>
    public void ChangePassword(byte[] newPassword)
    {
      if (_connectionState != ConnectionState.Open)
        throw new InvalidOperationException("Database must be opened before changing the password.");

      _sql.ChangePassword(newPassword);
    }

    /// <summary>
    /// Sets the password for a password-protected database.  A password-protected database is
    /// unusable for any operation until the password has been set.
    /// </summary>
    /// <param name="databasePassword">The password for the database</param>
    public void SetPassword(string databasePassword)
    {
      SetPassword(String.IsNullOrEmpty(databasePassword) ? null : System.Text.UTF8Encoding.UTF8.GetBytes(databasePassword));
    }

    /// <summary>
    /// Sets the password for a password-protected database.  A password-protected database is
    /// unusable for any operation until the password has been set.
    /// </summary>
    /// <param name="databasePassword">The password for the database</param>
    public void SetPassword(byte[] databasePassword)
    {
      if (_connectionState != ConnectionState.Closed)
        throw new InvalidOperationException("Password can only be set before the database is opened.");

      if (databasePassword != null)
        if (databasePassword.Length == 0) databasePassword = null;

      _password = databasePassword;
    }

    private const string _dataDirectory = "|DataDirectory|";

    /// <summary>
    /// Expand the filename of the data source, resolving the |DataDirectory| macro as appropriate.
    /// </summary>
    /// <param name="sourceFile">The database filename to expand</param>
    /// <returns>The expanded path and filename of the filename</returns>
    private string ExpandFileName(string sourceFile)
    {
      if (String.IsNullOrEmpty(sourceFile)) return sourceFile;

      if (sourceFile.StartsWith(_dataDirectory, StringComparison.OrdinalIgnoreCase))
      {
        string dataDirectory;

#if PLATFORM_COMPACTFRAMEWORK
        dataDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetCallingAssembly().GetName().CodeBase);
#else
        dataDirectory = AppDomain.CurrentDomain.GetData("DataDirectory") as string;
        if (String.IsNullOrEmpty(dataDirectory))
          dataDirectory = AppDomain.CurrentDomain.BaseDirectory;
#endif

        if (sourceFile.Length > _dataDirectory.Length)
        {
          if (sourceFile[_dataDirectory.Length] == System.IO.Path.DirectorySeparatorChar ||
              sourceFile[_dataDirectory.Length] == System.IO.Path.AltDirectorySeparatorChar)
            sourceFile = sourceFile.Remove(_dataDirectory.Length, 1);
        }
        sourceFile = System.IO.Path.Combine(dataDirectory, sourceFile.Substring(_dataDirectory.Length));
      }

      return sourceFile;
    }
    ///<overloads>
    /// The following commands are used to extract schema information out of the database.  Valid schema types are:
    /// <list type="bullet">
    /// <item>
    /// <description>MetaDataCollections</description>
    /// </item>
    /// <item>
    /// <description>DataSourceInformation</description>
    /// </item>
    /// <item>
    /// <description>Catalogs</description>
    /// </item>
    /// <item>
    /// <description>Columns</description>
    /// </item>
    /// <item>
    /// <description>ForeignKeys</description>
    /// </item>
    /// <item>
    /// <description>Indexes</description>
    /// </item>
    /// <item>
    /// <description>IndexColumns</description>
    /// </item>
    /// <item>
    /// <description>Tables</description>
    /// </item>
    /// <item>
    /// <description>Views</description>
    /// </item>
    /// <item>
    /// <description>ViewColumns</description>
    /// </item>
    /// </list>
    /// </overloads>
    /// <summary>
    /// Returns the MetaDataCollections schema
    /// </summary>
    /// <returns>A DataTable of the MetaDataCollections schema</returns>
    public override DataTable GetSchema()
    {
      return GetSchema("MetaDataCollections", null);
    }

    /// <summary>
    /// Returns schema information of the specified collection
    /// </summary>
    /// <param name="collectionName">The schema collection to retrieve</param>
    /// <returns>A DataTable of the specified collection</returns>
    public override DataTable GetSchema(string collectionName)
    {
      return GetSchema(collectionName, new string[0]);
    }

    /// <summary>
    /// Retrieves schema information using the specified constraint(s) for the specified collection
    /// </summary>
    /// <param name="collectionName">The collection to retrieve</param>
    /// <param name="restrictionValues">The restrictions to impose</param>
    /// <returns>A DataTable of the specified collection</returns>
    public override DataTable GetSchema(string collectionName, string[] restrictionValues)
    {
      if (_connectionState != ConnectionState.Open)
        throw new InvalidOperationException();

      string[] parms = new string[5];

      if (restrictionValues == null) restrictionValues = new string[0];
      restrictionValues.CopyTo(parms, 0);

      switch (collectionName.ToUpper(CultureInfo.InvariantCulture))
      {
        case "METADATACOLLECTIONS":

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久久伊人| 欧美精品第一页| 一区在线中文字幕| 91免费国产视频网站| 亚洲桃色在线一区| 欧美日韩成人综合天天影院| 五月天亚洲婷婷| 久久精品视频在线看| 国产成人日日夜夜| 亚洲国产日韩综合久久精品| 555www色欧美视频| 国产电影精品久久禁18| 亚洲欧洲av在线| 欧美区在线观看| 丁香网亚洲国际| 蜜臀a∨国产成人精品| 91精品麻豆日日躁夜夜躁| 三级在线观看一区二区 | 蜜乳av一区二区三区| 国产亚洲精品bt天堂精选| 色8久久精品久久久久久蜜| 久久99精品国产麻豆不卡| 亚洲一区二区美女| 亚洲欧美日韩国产综合| 精品久久久网站| 日韩一区二区免费电影| 欧美视频三区在线播放| 成人午夜激情影院| 国产成人av电影在线| 亚洲1区2区3区4区| 亚洲电影一区二区| 亚洲一本大道在线| 亚洲国产视频一区| 亚洲第一主播视频| 日本午夜一本久久久综合| 亚洲精品午夜久久久| 日韩理论在线观看| 亚洲色图在线看| 亚洲男女一区二区三区| 亚洲永久免费视频| 欧美aa在线视频| 成人免费电影视频| 亚洲电影一区二区| 狠狠久久亚洲欧美| 国产a区久久久| 欧美专区亚洲专区| 久久综合精品国产一区二区三区| 精品国产乱码久久久久久蜜臀 | 麻豆免费看一区二区三区| 欧美a级一区二区| 成人小视频在线| 99精品黄色片免费大全| 欧美在线观看18| 欧美精品一区二区精品网| ...xxx性欧美| 激情六月婷婷综合| 91麻豆成人久久精品二区三区| 欧美色大人视频| 国产精品美女久久久久久久久久久 | 黑人巨大精品欧美黑白配亚洲| 精品一区二区三区免费观看| av动漫一区二区| 精品国产成人在线影院| 亚洲二区在线视频| 91亚洲国产成人精品一区二区三| 日韩午夜激情av| 亚洲成人av电影| 91视频你懂的| 中文字幕制服丝袜成人av | 国产又黄又大久久| 日韩一区二区三区在线| 首页综合国产亚洲丝袜| 91伊人久久大香线蕉| 1024成人网| 欧美三区在线视频| 亚洲小说欧美激情另类| 色老综合老女人久久久| 亚洲欧美日韩一区二区| 成人综合婷婷国产精品久久| 久久久久久黄色| 91在线无精精品入口| 亚洲卡通动漫在线| 欧美日韩国产天堂| 美国毛片一区二区| 久久精品男人天堂av| 成人免费看的视频| 亚洲风情在线资源站| 日韩亚洲欧美一区二区三区| 经典三级视频一区| 亚洲国产精品99久久久久久久久 | 国内不卡的二区三区中文字幕| 精品99一区二区| 色先锋资源久久综合| 日韩精品1区2区3区| 国产精品日日摸夜夜摸av| 色婷婷亚洲精品| 免费三级欧美电影| 久久这里只有精品视频网| 99精品视频一区二区| 日本在线不卡视频一二三区| 国产三级三级三级精品8ⅰ区| 欧美影院一区二区三区| 国产乱子伦一区二区三区国色天香| 国产精品国产三级国产aⅴ原创| 欧美性感一类影片在线播放| 国产黄色精品网站| 久久er精品视频| 性做久久久久久久免费看| 亚洲欧美日韩精品久久久久| 国产欧美一区二区精品性| 91精品国产丝袜白色高跟鞋| 99re热视频这里只精品| www.色综合.com| 国产精品自拍三区| 日本韩国一区二区三区视频| 国产一区二区视频在线播放| 天天综合网天天综合色| 一区二区三区国产豹纹内裤在线| 欧美极品xxx| 亚洲欧美一区二区三区孕妇| 亚洲男女一区二区三区| 亚洲欧美激情一区二区| 亚洲人成影院在线观看| 亚洲成人激情自拍| 日韩精品久久理论片| 国产一区欧美二区| 国产a视频精品免费观看| 色88888久久久久久影院按摩 | 成人综合在线视频| 色先锋资源久久综合| 欧美精品一二三区| 国产亚洲女人久久久久毛片| 中文字幕中文字幕一区二区| 亚洲成人免费观看| 狠狠v欧美v日韩v亚洲ⅴ| 一本大道久久a久久综合婷婷| 欧美少妇性性性| 国产精品水嫩水嫩| 日韩中文欧美在线| 波多野结衣一区二区三区| 色婷婷国产精品久久包臀| 亚洲精品在线电影| 亚洲一区二区三区四区五区中文| 久久99最新地址| 一本色道久久综合精品竹菊| 久久综合久久综合久久综合| 一区二区三区精品| 色综合久久久网| 中国av一区二区三区| 狠狠久久亚洲欧美| 欧美一区二区三区在线电影| 一区二区三区在线高清| av电影天堂一区二区在线| 久久精品欧美一区二区三区不卡 | 在线电影国产精品| 亚洲国产日韩综合久久精品| 91一区二区在线| 国产精品久久久久一区| 不卡一二三区首页| 亚洲视频一二三| 国产精品影音先锋| 91麻豆精品久久久久蜜臀| 日韩制服丝袜先锋影音| 精品伦理精品一区| 国产成人av电影在线观看| 国产色婷婷亚洲99精品小说| 成人国产精品视频| 亚洲黄一区二区三区| 欧美精品 国产精品| 另类小说一区二区三区| 日韩欧美国产1| www.在线成人| 精品国产一区二区三区久久久蜜月| 中文字幕一区不卡| 九一九一国产精品| 久久嫩草精品久久久精品| 丁香激情综合国产| 午夜精品在线视频一区| 日韩美女一区二区三区四区| 国产精品亚洲综合一区在线观看| 国产人成亚洲第一网站在线播放 | 亚洲视频在线一区观看| 欧美日韩aaaaa| 国产成人在线观看| 天堂资源在线中文精品| 国产精品天干天干在观线| 欧美日韩成人激情| 色婷婷亚洲婷婷| 成人av在线资源网| 国产寡妇亲子伦一区二区| 亚洲精品视频观看| 欧美丰满少妇xxxbbb| 91免费在线看| 91麻豆免费看| 成人sese在线| 成人禁用看黄a在线| 国产91精品露脸国语对白| 国产精品一区二区你懂的| 日韩激情在线观看| 三级影片在线观看欧美日韩一区二区 |