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

  • 相关阅读:
    JavaScript 操作注意事项(此日志持续更新)
    JavaScript省市级联
    Outlook 2013 中添加 live.cn 帐户
    readonly, const, static, static readonly 关键字实例说明
    Windows 8 应用开发常见问题及解决方案(持续更新)
    【转】用C#动态创建Access数据库
    使用 Layer 弹出 iframe 层,并让 iframe 自适应内容宽高
    Visual Studio 常见问题及解决方案(持续更新)
    Python核心编程学习日记之模块
    Python核心编程学习日记之函数式编程
  • 原文地址:https://www.cnblogs.com/luoyaoquan/p/2081651.html
Copyright © 2011-2022 走看看