zoukankan      html  css  js  c++  java
  • SQLiteHelper

    from:http://www.eggheadcafe.com/articles/20050315.asp

    And here is a Quasi "help document" in the NDoc LinearHTML format:

    public class SQLiteHelper

    SQLiteHelper is a utility class similar to "SQLHelper" in MS Data Access Application Block and follows similar pattern.

    Method Members

    Name Access Summary
    AssignParameterValues() : Void protected This method assigns dataRow column values to an array of IDataParameters
    AssignParameterValues() : Void protected This method assigns an array of values to an array of IDataParameters
    AssignParameterValues() : Void familyOrAssembly This method assigns dataRow column values to an IDataParameterCollection
    CreateCommand() : SQLiteCommand public Creates the command.
    CreateCommand() : SQLiteCommand public Creates the command.
    CreateParameter() : SQLiteParameter public Creates the parameter.
    DeriveParameters() : SQLiteParameterCollection public Parses parameter names from SQL Statement, assigns values from object array , and returns fully populated ParameterCollection
    ExecuteDataset() : DataSet public Executes the dataset from a populated Command object.
    ExecuteDataSet() : DataSet public Shortcut method to execute dataset from SQL Statement and object[] arrray of /// parameter values
    ExecuteDataset() : DataSet public Executes the dataset in a SQLite Transaction
    ExecuteDataset() : DataSet public Executes the dataset with Transaction and object array of parameter values.
    ExecuteDataSet() : DataSet public Shortcut method to execute dataset from SQL Statement and object[] arrray of parameter values
    ExecuteNonQuery() : Int32 public
    ExecuteNonQuery() : Int32 public Executes non-query sql Statment with Transaction
    ExecuteNonQuery() : Int32 public Executes the non query.
    ExecuteNonQuery() : Int32 public Shortcut to ExecuteNonQuery with SqlStatement and object[] param values
    ExecuteNonQueryTypedParams() : Int32 public Executes non query typed params from a DataRow
    ExecuteReader() : IDataReader public ShortCut method to return IDataReader NOTE: You should explicitly close the Command.connection you passed in as well as call Dispose on the Command after reader is closed. We do this because IDataReader has no underlying Connection Property.
    ExecuteScalar() : Object public Shortcut to ExecuteScalar with Sql Statement embedded params and object[] param values
    ExecuteXmlReader() : XmlReader public Execute XmlReader with complete Command
    UpdateDataset() : Void public Executes the respective command for each inserted, updated, or deleted row in the DataSet.

    To use this, download the SQLiteHelper.cs class and the CHM documentation in the zip file below, and ADD the SQLiteHelper.cs class file to the ADO.NET provider source code project, and rebuild it. Done! Now you have SQLite.Net ADO.NET provider with a familiar, built-in SQLiteHelper class should you need it. Feel free to improve if you are so inclined.

    N.B. I just checked the sourceforge.net site and it looks like Robert fixed a bug in the Command class. So I've gotten the new source and compiled a release build of SQLite.NET.dll as of 3/17/2005. It includes my SQLiteHelper class and is in the zip file below.

    Download the source code that accompanies this article

  • 相关阅读:
    Java 基本知识
    开源框架 Java
    Java 常用工具
    centos7设置静态IP
    VMnet1、VMnet8到底是什么?
    centos7修改主机名的方法
    防火墙阻止了虚拟机与主机之间互相ping通解决方案
    虚拟机centos与主机互相Ping通
    centos个性化命令行提示符
    更多的常用命令
  • 原文地址:https://www.cnblogs.com/luoyaoquan/p/2081651.html
Copyright © 2011-2022 走看看