Introduction

SQLite ADO.NET 2.0 Provider
SQLite.NET Class Library Documentation
See Also Example

About SQLite.NET

This class library is an ADO.NET 2.0 wrapper around the popular (and free!) SQLite database engine. For information on SQL syntax, features of SQLite and a good understanding of how it works and what it does, I highly recommend heading over to sqlite.org and reading the documentation there.

The C# provider, the very minor C code modifications to SQLite, documentation and etc were written by Robert Simpson, and the SourceForge project page can be found here.

What's New?

Click here to see the version history of this SQLite.NET provider

What's Coming Up?

There's a few things I'm aiming to do in the near future:

  • More class documentation and examples. I'll also be integrating a lot of the documentation from the official sqlite.org website into the helpfile for quick and easy access.
  • Design-time support for DDL, enabling you to create/alter tables, manage indexes and foreign keys, etc.

Using this library

The following are links to information on various aspects of the library and how to use it in your application(s)

How to install Visual Studio Design-Time Support

How to configure and enumerate SQLite.NET through the DbProviderFactories object

Getting the best performance out of SQLite

Limitations of the SQLite.NET provider and the SQLite engine (compared to other providers and engines)

SQLite.NET Provider Features

This SQLite provider implements every feature of the underlying SQLite database engine without omission. Here's a brief summary:

  • Written from scratch on VS2005/2008 specifically for ADO.NET 2.0, implenting all the base classes and features recently introduced in the framework, including automatic transaction enlistment.
  • Supports the Full and Compact .NET Framework, as well as native C/C++ development. 100% binary compatible with the original sqlite3.dll.
  • On the Compact Framework, it is faster than the newly-introduced Sql Server Mobile. SQLite's installed size is a fraction of Sql Mobile's. It uses less memory at runtime, runs queries faster, and has a smaller database file size as well.
  • Encrypted database support. Encrypted databases are fully encrypted and support both binary and cleartext password types.
  • Visual Studio 2005/2008 Design-Time Support. You can add a SQLite database to the Servers list, design queries with the Query Designer, drag-and-drop tables onto a Typed DataSet, etc.
  • Single file redistributable. The core sqlite3 codebase and the ADO.NET wrapper are combined into one multi-module assembly.
  • Binaries included for Itanium, x64, x86 and ARM processors.
  • DbProviderFactory support.
  • Full support for ATTACH'ed databases. Exposed as Catalogs in the schema. When cloning a connection, all attached databases are automatically re-attached to the new connection.
  • DbConnection.GetSchema(...) support includes the MetaDataCollections, DataSourceInformation, Columns, Tables, Views, ViewColumns, Catalogs, Indexes, IndexColumns and ForeignKeys keywords.
  • Enhanced DbDataReader.GetSchemaTable() functionality returns catalog, namespace and detailed schema information even for complex queries.
  • Named and unnamed parameters.
  • Full UTF-8 and UTF-16 support, each with optimized pipelines into the native database core.
  • Multiple simultaneous DataReaders (one DataReader per Command however).
  • Full support for user-defined scalar and aggregate functions, encapsulated into an easy-to-use base class in which only a couple of overrides are necessary to implement new SQL functions.
  • Full support for user-defined collating sequences, every bit as simple to implement as user-defined functions and uses the same base class.
  • Full source for the entire engine and wrapper. No copyrights. Public Domain. 100% free for commercial and non-commercial use.

Distributing the Binaries

System.Data.SQLite.DLL is a mixed assembly signed with a strong name in case you want to add it to the Global Assembly Cache (GAC). This is the only DLL required to be redistributed with your SQLite.NET application(s). It comes in 4 flavors: Win32, Itanium, X64 (AMD64) and ARM (Compact Framework). The Compact Framework library is signed with a separate strong name, but all the other versions share the same strong name so they can be interchanged where appropriate without any change to your application.

Send comments on this topic.


Design-Time Support
SQLite.NET Class Library Documentation

Installing SQLite Visual Studio Design-Time Support

Supporting the Visual Studio query designer and allowing you to manipulate SQLite databases from within Visual Studio is a great time-saver. Though the support is not yet fully-implemented, there's certainly enough there to keep you busy. You can create databases, design and execute queries, create typed datasets and lots more all from Visual Studio.

Installation Instructions

In Windows Explorer, navigate to SQLite.Net\bin\Designer and execute the INSTALL.EXE program. It will automatically detect what eligible Visual Studio products are installed, and allow you to check and uncheck which environments to install the designer for.

Express Edition Limitations

All Express Editions (except Visual Web Developer) are hard-coded to only allow you to design for Jet and Sql Server Database Files. The only way for SQLite to install its designer is to temporarily replace one of the existing "approved" designers. Therefore, when you install the SQLite designer for one of these express editions, it will temporarily replace the Microsoft Access designer. You can revert back to the Access designer simply by re-running the install.exe program and un-checking the boxes.


DbProviderFactory Support
SQLite.NET Class Library Documentation

DbProviderFactories and You

One of the great new features of ADO.NET 2.0 is the use of reflection as a means of instantiating database providers programmatically. The information .NET uses to enumerate the available data providers in the system is relatively simple. It merely looks in the machine.config and in your own app.config file for some XML data to tell it what providers are installed and what assemblies those providers are in.

Scenario 1: Version Independent (does not use the Global Assembly Cache)

This method allows you to drop any new version of the System.Data.SQLite.DLL into your application's folder and use it without any code modifications or recompiling. Add the following code to your app.config file:

<configuration>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite"/>
      <add name="SQLite Data Provider" invariant="System.Data.SQLite"
           description=".Net Framework Data Provider for SQLite"
           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
    </DbProviderFactories>
  </system.data>
</configuration>

Scenario 2: Version Dependent, using either the DLL located in the same folder as the application or the Global Assembly Cache

This method expands on the above XML to provide the version number and key token of the SQLite DLL so it can be found either in the same folder as the application or looked up in the GAC. The downside to this method is that DbProviderFactories will use this version information to only load the version specified. This means if you update the DLL, you must also update this XML.

<configuration>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite"/>
      <add name="SQLite Data Provider" invariant="System.Data.SQLite"
           description=".Net Framework Data Provider for SQLite"
           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite,
                 Version=1.0.49.0, Culture=neutral,
                 PublicKeyToken=db937bc2d44ff139"/>
    </DbProviderFactories>
  </system.data>
</configuration>

The following C# code demonstrates instantiating SQLite through DbProviderFactories:

      DbProviderFactory fact = DbProviderFactories.GetFactory("System.Data.SQLite");
      using (DbConnection cnn = fact.CreateConnection())
      {
        cnn.ConnectionString = "Data Source=test.db3";
        cnn.Open();
      }


Optimizing Your Queries

Optimizing for SQLite
SQLite.NET Class Library Documentation
See Also Example

Tips on Optimizing Your Queries

The next few paragraphs will attempt to give you a few rudimentary rules for speeding up your queries in general, and especially how SQLite is adversely affected by the kinds of SQL behaviors you may have taken for granted in other providers. It is by no means a complete optimization guide. For even more details on optimizing your queries, visit sqlite.org.

The Importance of Transactions

If you are inserting data in SQLite without first starting a transaction: DO NOT PASS GO! Call BeginTransaction() right now, and finish with Commit()! If you think I'm kidding, think again. SQLite's A.C.I.D. design means that every single time you insert any data outside a transaction, an implicit transaction is constructed, the insert made, and the transaction destructed. EVERY TIME. If you're wondering why in the world your inserts are taking 100x longer than you think they should, look no further.

Prepared Statements

Lets have a quick look at the following code and evaluate its performance:

      using (SQLiteCommand mycommand = new SQLiteCommand(myconnection))
      {
        int n;

        for (n = 0; n < 100000; n ++)
        {
          mycommand.CommandText = String.Format("INSERT INTO [MyTable] ([MyId]) VALUES({0})", n + 1);
          mycommand.ExecuteNonQuery();
        }
      }

This code seems pretty tight, but if you think it performs well, you're dead wrong. Here's what's wrong with it:

  • I didn't start a transaction first! This insert is dog slow!
  • The CLR is calling "new" implicitly 100,000 times because I am formatting a string in the loop for every insert
  • Since SQLite precompiles SQL statements, the engine is constructing and deconstructing 100,000 SQL statements and allocating/deallocating their memory
  • All this construction and destruction is involving about 300,000 more native to managed interop calls than an optimized insert

So lets rewrite that code slightly:

      using (SQLiteTransaction mytransaction = myconnection.BeginTransaction())
      {
        using (SQLiteCommand mycommand = new SQLiteCommand(myconnection))
        {
          SQLiteParameter myparam = new SQLiteParameter();
          int n;

          mycommand.CommandText = "INSERT INTO [MyTable] ([MyId]) VALUES(?)";
          mycommand.Parameters.Add(myparam);

          for (n = 0; n < 100000; n ++)
          {
            myparam.Value = n + 1;
            mycommand.ExecuteNonQuery();
          }
        }
        mytransaction.Commit();
      }

Now this is a blazing fast insert for any database engine, not just SQLite. The SQL statement is prepared one time -- on the first call to ExecuteNonQuery(). Once prepared, it never needs re-evaluating. Furthermore, we're allocating no memory in the loop and doing a very minimal number of interop transitions. Surround the entire thing with a transaction, and the performance of this insert is so far and away faster than the original that it merits a hands-on-the-hips pirate-like laugh.

Every database engine worth its salt utilizes prepared statements. If you're not coding for this, you're not writing optimized SQL, and that's the bottom line.


Provider Limitations
SQLite.NET Class Library Documentation

Limitations of this ADO.NET SQLite Data Provider

As providers go, this one doesn't have many restrictions. SQLite has no support for row-level or table-level locks. When a connection locks the database for writing, no other connection or process may read or write to the database until the write operation is complete. The SQLite.NET provider attempts to retry internally if a database is locked, up to the CommandTimeout property of the command in question.

SQLite is inherently type-less, and only understands a few basic datatypes natively. They are (in .NET-speak) Int64, Double, String and Blob. The SQLite.NET provider will use the database schema information it can glean to enforce type-ness, but it is an inexact science.

Hierarchical DataReaders are not supported. In the case of transactions, any SQLiteCommand created on a connection will (when executed) automatically join a transaction in progress, regardless of whether that transaction was created before or after the command.

A SQLiteCommand object can be re-assigned a new SQLiteConnection object as long as no DataReaders are active on the command.

Opening a transaction is considered a write operation, so only use them when you want to write to the database! If you hold open a transaction, all readers on other connections will be blocked until the transaction is closed!

Thread Safety

Multi-threading in SQLite must be done carefully. Here are the restrictions:

  • You May Clone() a SQLiteConnection object in one thread and pass the cloned object to another thread. Once passed, the other thread becomes the new owner of the cloned connection, and the original thread must not keep a reference to the clone or call any methods on the clone.
  • You May create multiple threads, and those threads can create their own SQLiteConnection and subsequent objects for accessing a database. Multiple connections on multiple threads to the same database file are perfectly acceptable and will behave predictably.
  • You May NOT call methods or properties or otherwise reference any SQLite provider classes that belong to another thread.
  • You May NOT pass a SQLiteCommand, SQLiteDataReader, SQLiteDataAdapter or any other SQLite provider class except a cloned SQLiteConnection to another thread.

Understand again that SQLite has no fine-grained locking mechanisms. It is therefore your own responsibility in a multi-threaded environment to handle potential timeouts that may occur if a long-running query in one thread prevents a query in another thread from executing. These timeouts will only occur if one thread is attempting to read while another thread is attempting to write. Whichever thread got its lock first will be the one to execute, and the other thread will block until the CommandTimeout value elapses or the other thread finishes.


Version History
SQLite.NET Class Library Documentation

Version History

1.0.49.0 - May 28, 2008

  • Code merge with SQLite 3.5.9
  • Fixed schema problems when querying the TEMP catalog.
  • Changed BLOB datatype schema to return IsLong = False instead of True. This was preventing DbCommandBuilder from using GUID's and BLOB's as primary keys.
  • Fix rollover issue with SQLite3.Reset() using TickCount.
  • Fixed SQLiteDataReader to dispose of its command (if called for) before closing the connection (when flagged to do so) instead of the other way around.
  • Fixed a DbNull error when retrieving items not backed by a table schema.
  • Fixed foreign key constraint parsing bug.
  • Added FailIfMissing property to the SQLiteConnectionStringBuilder.
  • Converted the source projects to Visual Studio 2008.

1.0.48.0 - December 28, 2007

  • Code merge with SQLite 3.5.4
  • Calling SQLiteDataReader.GetFieldType() on a column with no schema information and whos first row is initially NULL now returns type Object instead of type DbNull.
  • Added support for a new DateTime type, JulianDay. SQLite uses Julian dates internally.
  • Added a new connection string parameter "Default Timeout" and a corresponding method on the SQLiteConnection object to change the default command timeout. This is especially useful for changing the timeout on transactions, which use SQLiteCommand objects internally and have no ADO.NET-friendly way to adjust the command timeout on those commands.
  • FTS1 and FTS2 modules were removed from the codebase. Please upgrade all full-text indexes to use the FTS3 module.

1.0.47.2 - December 10, 2007

  • Fixed yet one more bug when closing a database with unfinalized command objects
  • Fixed the DataReader's GetFieldType function when dealing with untyped SQLite affinities

1.0.47.1 - December 5, 2007

  • Fixed a leftover bug from the codemerge with SQLite 3.5.3 that failed to close a database.
  • Fixed the broken Compact Framework distribution binary.
  • SQLite 3.5.x changed some internal infrastructure pieces in the encryption interface which I didn't catch initially. Fixed.

1.0.47.0 - December 4, 2007

  • Code merge with SQLite 3.5.3
  • Added installer support for Visual Studio 2008. Code is still using the VS2005 SDK so one or two bells and whistles are missing, but nothing significant.
  • This is the last version that the FTS1 and FTS2 extensions will appear. Everyone should rebuild their fulltext indexes using the new FTS3 module. FTS1 and FTS2 suffer from a design flaw that could cause database corruption with certain vacuum operations.
  • Fixed pooled connections so they rollback any outstanding transactions before going to the pool.
  • Fixed the unintended breaking of the TYPES keyword, and mis-typing of untyped or indeterminate column types.
  • Assert a FileIOPermission() requirement in the static SQLiteFunction constructor.
  • The CE-only SQLiteFunction.RegisterFunction() is now available on the desktop platform for dynamic registration of functions. You must still close and re-open a connection in order for the new function to be seen by a connection.
  • Fixed the "database is locked" errors by implementing behavioral changes in the interop.c file for SQLite. Closing a database force-finalizes any prepared statements on the database to ensure the connection is fully closed. This was rather tricky because the GC thread could still be finalizing statements itself.
  • Modifed the mergebin utility to help circumvent a long-standing strong name verification bug in the Compact Framework.

1.0.46.0 - September 30, 2007

  • Fixed faulty logic in type discovery code when using SQLiteDataReader.GetValue().
  • Fixed Connection.Open() bug when dealing with :memory: databases.
  • Fixed SQLiteCommand.ExecuteScalar() to return a properly-typed value.
  • Added support for SQLiteParameter.ResetDbType().
  • Added test cases for rigid and flexible type testing.

1.0.45.0 - September 25, 2007

  • Breaking change in GetSchema("Indexes") -- MetaDataCollections restrictions and identifier parts counts were wrong for this schema and I was using the wrong final parameter as the final restriction. Meaning, if you use the Indexes schema and are querying for a specific index the array should now be {catalog, null, table, index } instead of {catalog, null, table, null, index}
  • Fixed some errors in the encryption module, most notably when a non-default page size is specified in the connection string.
  • Fixed SQLiteDataReader to better handle type-less usage scenarios, which also fixes problems with null values and datetimes.
  • Fixed the leftover temp files problem on WinCE
  • Added connection pooling. The default is disabled for now, but may change in the future. Set "Pooling=True" in the connection string to enable it.
  • Sped up SQLiteConnection.Open() considerably.
  • Added some more robust cleanup code regarding SQLiteFunctions.
  • Minor additions to the code to allow for future LINQ integration into the main codebase.
  • Fixed a long-standing bug in the Open() command of SQLiteConnection which failed to honor the documented default behavior of the SQLite.NET provider to open the database in "Synchronous=Normal" mode. The default was "Full".
  • If Open() fails, it no longer sets the connection state to Broken. It instead reverts back to Closed, and cleans up after itself.
  • Added several new parameters to the ConnectionString for setting max page count, legacy file format, and another called FailIfMissing to raise an error rather than create the database file automatically if it does not already exist.
  • Fixed some designer toolbox references to the wrong version of the SQLite.Designer
  • Fixed a bug in the mergebin utility with regards to COR20 metadata rowsize computations.
  • Minor documentation corrections

1.0.44.0 - July 21, 2007

  • Code merge with SQLite 3.4.1
  • Fixed a bug in SQLiteConnection.Open() which threw the wrong kind of error in the wrong kind of way when a database file could not be opened or created.
  • Small enhancements to the TYPES keyword, and added documentation for it in the help file.
  • Hopefully fixed the occasional SQLITE_BUSY errors that cropped up when starting a transaction. Usually occurred in high-contention scenarios, and the underlying SQLite engine bypasses the busy handler in this scenario to return immediately.

1.0.43.0 - June 21, 2007

  • Code merge with SQLite 3.4.0
  • Fixed a reuse bug in the SQLiteDataAdapter in conjunction with the SQLiteCommandBuilder. It's been there unnoticed for more than a year, so it looks like most folks never encountered it.
  • Fixed an event handler bug in SQLiteCommandBuilder in which it could fail to unlatch from the DataAdapter when reused. Relates to the previous bugfix.
  • Fixed a double-dispose bug in SQLiteStatement that triggered a SQLiteException.

1.0.42.0 - June 1, 2007

  • Code merge with SQLite 3.3.17
  • Changed the SQLiteFunction static constructor so it only enumerates loaded modules that have referenced the SQLite assembly, which hopefully should cut down dramatically the time it takes for that function to execute.
  • Added the FTS2 full-text search extension to the project. Look for FTS1 to disappear within the next couple of revisions.
  • Fixed a bug introduced with the finalizers that triggered an error when statements ended with a semi-colon or had other non-parsable comments at the end of a statement
  • Fixed an intermittent multi-threaded race condition between the garbage collector thread and the main application thread which lead to an occasional SQLITE_MISUSE error.
  • Fixed another issue relating to SQLite's inherent typelessness when dealing with aggregate functions which could return Int64 or Double or even String for a given row depending on what was aggregated.
  • Remembered to recompile the DDEX portion of the engine this time, so Compact Framework users can once again use the design-time functionality

1.0.41.0 - April 23, 2007

  • Code merge with SQLite 3.3.16
  • Second go at implementing proper finalizers to cleanup after folks who've forgotten to Dispose() of the SQLite objects
  • Enhanced GetSchema(IndexColumns) to provide numeric scale and precision values
  • Fixed the column ordinals in GetSchema(IndexColumns) to report the ordinal of the column in the index, not the table
  • Fixed a bug whereby parameters named with an empty string (such as String.Empty) were treated like a named parameter instead of an unnamed parameter

1.0.40.0 - January 31, 2007

  • Code merge with SQLite 3.3.12
  • Lots of new code to handle misuse of the library. Implemented finalizers where it made sense, fixed numerous garbage collector issues when objects are not disposed properly, fixed some object lifetime issues, etc.
  • A failed Commit() on a transaction no longer leaves the transaction in an unusable state.

1.0.39.1 - January 11, 2007

  • Fixed a really dumb mistake that for some reason didn't trigger any errors in the testcases, whereby commands when associated with a connection were not adding or removing themselves from an internal list of commands for that connection -- causing a "database is locked" error when trying to close the connection.

1.0.39.0 - January 10, 2007

  • Code merge with SQLite 3.3.10
  • Fixed a multi-threaded race condition bug in the garbage collector when commands and/or connections are not properly disposed by the user.
  • Switched the encryption's internal deallocation code to use sqlite's built-in aux functions instead of modifying the pager.c source to free the crypt block. This eliminates the last of the code changes the provider makes to the original sqlite engine sources. Props to Ralf Junker for pointing that out.

1.0.38.0 - November 22, 2006

  • Fixed a bug when using CommandBehavior.KeyInfo whereby integer primary key columns may be duplicated in the results.
  • Enhanced the CommandBuilder so that update/delete statements are optimized when the affected table contains unique constraints and a primary key is present.
  • Fixed a bug in the DataReader when used in conjunction with CommandBehavior.CloseConnection.

1.0.37.0 - November 19, 2006

  • Added support for CommandBehavior.KeyInfo. When specified in a query, additional column(s) will be returned describing the key(s) defined for the table(s) selected in the query. This is optimized when INTEGER PRIMARY KEY is set for the given tables, but does additional work for other kinds of primary keys.
  • Removed the default values from SQLiteDataReader.GetTableSchema(), to better follow Sql Server's pattern and suppress schema errors when loading the records into a dataset/datatable.
  • Allow integers to implicitly convert to double/decimal/single.

1.0.36.1 - October 25, 2006

  • Added support for LONGVARCHAR, SMALLDATE and SMALLDATETIME. These were actually added in 1.0.36.0 but were undocumented.
  • Fixed the embedded helpfile which was accidentally built from old sources.
  • Fixed an unfortunate re-entry of a bug in the .36 codebase that caused the provider to "forget" about commands on a connection under certain circumstances.

1.0.36.0 - October 23, 2006

  • Code merge with SQLite 3.3.8, including support for full-text search via the FTS1 extension.
  • Fixed a bug retrieving data types when UseUtf16Encoding is true. Side-effect of further merging the common code between the two base classes.
  • Fixed a bug with System.Transactions whereby a connection closed/disposed within a transaction scope is rolled back and cannot be committed.
  • Added more error checking and reporting to transactions to help user's isolate the source of transaction failures.
  • Implemented a workaround for a Compact Framework issue regarding strong-named assemblies containing a PE section with a raw size less than the virtual size.

1.0.35.1 - September 12, 2006

  • Fixed the TYPES keyword to work when UseUTF16Encoding is true.
  • Fix another bug revealed in 1.0.35.0 regarding infinite loops when the 2nd or subsequent statements of a semi-colon separated command cannot be parsed.
  • Updated the help documentation.

1.0.35.0 - September 10, 2006

  • Fixed an infinite loop bug in SQLiteCommand caused when multiple semi-colon separated statements in a single command are executed via datareader and one of the statements contains a syntax error preventing it from being prepared.
  • Added the TYPES preparser keyword to be placed before a SELECT statement to aid the wrapper in converting expressions in a subsequent select clause into more robust types. Documentation yet to be integrated, but available on the forums.
  • Added a new connectionstring parameter "BinaryGUID=true/false" (default is "true"). When true, guid types are stored in the database as binary blobs to save space. Binary has been the default format since 1.0.32.0 but this parameter eases backward compatibility.

1.0.34.0 - September 4, 2006

  • Fixed a bug in SQLiteParameterCollection.RemoveAt(namedparam)
  • Fixed a bug in SQLiteDataReader introduced in 1.0.30 that broke DateTimes using the Ticks option in the connection string.
  • Fixed a bug in the recent changes to guid behavior wherein using a datareader's indexer to fetch a guid from a column containing both binary and text guids would sometimes return a byte array instead of a guid.
  • Enacted a workaround involving typed datasets in Compact Framework projects in which it took an excessive amount of time to open a form and generated a lot of temporary files in the user's Local Settings\Application Data\Microsoft\VisualStudio\8.0\Assembly References folder.

1.0.33.0 - August 21, 2006

  • Code merge with SQLite 3.3.7
  • Fixed a bug in SQLiteConnection that caused it to "forget" about commands bound to it and occasionally throw an error when a database is closed and opened repeatedly.

1.0.32.0 - August 6, 2006

  • Added AllowPartiallyTrustedCallers attribute to the assembly
  • Added the missing "nchar" type
  • Added support for binary Guid's. Guids are now stored as binary by default when using parameterized queries. Text guids are still fully supported.
  • Fixed a TransactionScope() error that caused the transaction not to be completed.
  • Enhanced parameter names so that if they are added to the Parameters collection without their prefix character (@ : or $) they are still properly mapped.

1.0.31.0 - July 16, 2006

  • Re-applied the view parsing bugfix in 1.0.29.0 that was accidentally reverted out of the 30 build.
  • Fixed SQLiteCommand.ExecuteScalar() to return null instead of DbNull.Value when no rows were returned.
  • Design-time installer now installs the package-based designer on full Visual Studio versions. Express editions continue to use the packageless designer.
  • In Visual Studio (not Express), you can now right-click a SQLite connection in the Server Explorer and vacuum the database and change the encryption password.

1.0.30.1 - July 2, 2006

  • Code merge with SQLite 3.3.6
  • Added support for the |DataDirectory| keyword in the Data Source filename string.
  • Added hook notification support to SQLiteConnection. Specifically, there are three new events on the SQLiteConnection object which are raised when an update/insert/delete occurs and when transactions are committed and rolled back.
  • Changed SQLiteTransaction to default to BEGIN IMMEDIATE instead of just BEGIN, which solves a multithreaded race condition.
  • Changed SQLiteDataReader to better support SQLite's typelessness. The data reader no longer caches column affinity, but re-evaluates it for each column/row.
  • Fixed a bug in Prepare() which caused an intermittant fault due to the code accessing the memory of an unpinned variable.
  • Fixed a multithreaded lock-retry bug in in SQLiteConnection.Open() and in SQLiteTransaction, which failed to use a command timeout before giving up.

1.0.29.0 - May 16, 2006

  • Fixed a bug in the Views schema information which caused multi-line view definition statements not to be parsed
  • Fixed a parsing bug in SQLiteDataReader.GetSchemaTable() to account for numeric(x,y) datatypes with specified precision and scale
  • Fixed a bug in SQLiteConnection.Open() which tried to automatically enlist in an ambient transaction but had not yet set the state of the database to Opened, thereby causing a transaction fault
  • Changed SQLiteException to inherit from DbException on the full framework

1.0.28.0 - April 14, 2006

  • Code merge with SQLite 3.3.5
  • You can now specify a relative path in the Compact Framework's "Data Source" by prefixing the file with ".\". i.e. "Data Source=.\\mydb.db3"
  • Several more changes and enhancements to schemas for better compatibility.
  • Fixed several bugs with the 64-bit builds of the provider. The x64 binary is now optimized.
  • Design-time installer now tries to install the 64-bit builds into the GAC along with the 32-bit build.
  • Fixed a bug in the SQLiteDataReader.GetSchemaTable() function when used with tables containing apostrophes.
  • Fixed an XSD-related bug whereby the XSD utility was unable to locate the provider and could not generate typed datasets.
  • Added NTEXT and STRING datatypes to the list of recognized keywords (used for schema retrieval).
  • Due to the XSD bug and other potential problems related to external build utilities, changes to the installation of the designer have had to be made. The installer used to write the DbProviderFactories XML into the devenv.exe.config file and its express cousins, but now has to write instead to the machine.config.
  • Installer writes to both the 32-bit machine.config and the 64-bit machine.config if it exists.

1.0.27.1 - February 28, 2006

  • Fixed a bug when doing data binding in Compact Framework projects that prevented you from assigning a typed dataset to a bindingsource. It turns out, the CF version of the SQLite provider needs to be flagged as retargetable so it'll work in the design-time desktop environment. No changes were made to the desktop build, but the revision was bumped on all libraries anyway in order to keep them sync'd.

1.0.27.0 - February 27, 2006

  • Many optimizations and a few more minor adjustments to schemas and schema retrieval performance.
  • Lots of design-time attributes added to the code. The DbDataAdapter, DbCommand, and DbConnection objects now have greatly enhanced design-time capabilities when added to the toolbox and dropped on a form.
  • Lots of Server Explorer enhancements.
  • Binaries are now distributed in a setup program for easier administration and configuration of the provider.

1.0.26.2 - February 15, 2006

  • Yet another bugfix to index schemas, which was incorrectly marking most indexes as primary key indexes.
  • Fixed GetSchema() to accept a null string array.
  • Fixed a misspelled export in the core C library that prevented databases opened with UTF16Encoding from getting schema information and would likely cause an error if attempted.

1.0.26.1 - February 14, 2006

  • Fixed even more minor schema bugs having to do with indexes.
  • Added two missing pieces in the SQLite designer which were preventing it from being used from within VS Express editions.
  • Several bugfixes to the design-time installer program, including supporting 64-bit environments.

1.0.26.0 - February 11, 2006

  • Code merge with SQLite 3.3.4
  • Fixed an encryption bug when changing the password of databases over 1gb in size.
  • Fixed various designer issues related to construction of named parameters.
  • Retooled the GetSchema() method of SQLiteDataReader to use the new 3.3.4 API functions, and made several enhancements and fixes to schemas.
  • Implemented the SourceColumnNullMapping property of SQLiteParameter to fix a DbCommandBuilder code generation bug.
  • Removed the runtime dependency on MSVCR80.DLL. File size is somewhat larger for the varying desktop versions, but the Compact Framework version remains the same.
  • Created an install program to manage installation and uninstallation of the SQLite design-time support.
  • Designer support now works for all Visual Studio editions, including all Express Editions.
  • Design-time installer will now remove (if present) the machine.config SQLite entries in favor of installing the xml code into the devenv.exe.config file (or any of the variations for express editions). The officially-accepted behavior of using DbProviderFactories is to add the code to your app.config file, and the machine.config file should not be touched.

1.0.25.0 - January 31, 2006

  • Code merge with SQLite 3.3.3
  • Added automatic distributed transaction enlistment and implemented the DbConnection.EnlistTransaction method for manual enlistment.
  • Nested transactions are now supported.
  • Rearranged the timing of SetPassword(), which now must be called before the database is opened instead of afterwards. Optionally, the password can be supplied in the ConnectionString.
  • Fixed a bug in SQLiteFunction that caused a failure when an empty resultset was returned and a custom user aggregate function was used in the query.
  • The designer has had another round of cleanup applied, in preparation for moving to a VS package.
  • Added SQLiteMetaDataCollectionNames class.

1.0.24.6 beta - January 23, 2006

  • This beta is built from sqlite.org's 3.3.2 beta.
  • Eliminated the static linking of mscoree from all binaries. Native projects can now use the library without any dependencies on the .NET framework, while managed projects continue to be able to use the library normally.

1.0.24.5 beta - January 20, 2006

  • This beta is built from sqlite.org's 3.3.1 alpha and contains development-in-progress code. Therefore no guarantees can be made regarding its suitability for production use.
  • You no longer need to distribute 2 files on the CompactFramework. You can delete SQLite.Interop.DLL entirely. I wrote a custom tool called "mergebin" (available in the source zip file) which combines the two libraries and gets around a glaring defect in the VS2005 linker for ARM processors which doesn't allow you to link netmodules.
  • x64 and ia64 builds now use the same strong name as the x86 build. This means breaking backward compatibility, but it was necessary in order to allow you to drop any of those 3 builds onto a PC and have your .NET program run properly. Prior to this, you'd get an error if you built your program using the x86 build, and then installed the x64 version on a target machine and tried to run your program against it.
  • The entire source project has been gone over top to bottom. A debug build no longer combines the binaries into a single module, which was preventing proper debugging.

1.0.24.4 beta - January 16, 2006

  • This beta is built from sqlite.org's 3.3.1 alpha and contains development-in-progress code. Therefore no guarantees can be made regarding its suitability for production use.
  • Fixed a bug in the UTF-16 handling code for preparing statements due to a behavioral change in SQLite 3.3.0.
  • Added pager.c code necessary to cleanup after an encrypted file is closed.
  • Fixed an encryption bug that caused a fault when an encrypted file was rolled back.
  • Modified the testcase code to take advantage of optimizations regarding the use of a DbCommandBuilder. DataAdapter insert speed increased dramatically as a result.

1.0.24.3 beta - January 10, 2006

  • This beta is built from sqlite.org's CVS HEAD (as it appeared at of the date of this beta) and contains development-in-progress code. Therefore no guarantees can be made regarding its suitability for production use.
  • Added support for database encryption at the pager level. Databases are encrypted using a 128-bit RC4 stream algorithm. To open an existing encrypted database, you may now specify a "Password={password}" text in the ConnectionString, or you may call the SQLiteConnection.SetPassword() function to set the password on an open connection. To encrypt existing non-encrypted databases or to change the password on an encrypted database, you must use the SQLiteConnection.ChangePassword() function. If you use SetPassword() instead of specifying a password in the connection string, or call ChangePassword() you may use a binary byte array or a text string as the password.
  • Rewrote the locking implementation for the Compact Framework. It is now more robust and incorporates into the SQLite codebase more efficiently than the previous CE adaptation.
  • Moved some of the embedded schema XML data into a resource file to ease code readability.
  • Automated the fixup of the original sqlite codebase's source prior to compiling, to ease merging with sqlite.org's source.

1.0.24.2 - December 30, 2005

  • Fixed the SQLiteDataReader.HasRows property to return the proper value.
  • Implemented the inadvertently neglected RecordsAffected property on SQLiteDataReader.
  • SQLiteFunction static constructor was changed to pre-filter classes with only the SQLiteFunctionAttribute. The code was throwing an exception when certain assemblies were referenced in a project.
  • Fixed the SQLiteDataAdapter OnRowUpdated event, which was using the wrong variable to find the attached event handler and subsequently not raising the event.
  • Small optimizations and fixes to SQLiteDataReader.NextResult().

1.0.24.1 - December 19, 2005

  • Update core SQLite engine to 3.2.8

1.0.24 - December 9, 2005

  • Fixed the Catalogs schema bug that caused attached databases not to be re-attached to a cloned connection
  • Enhanced transactions to allow for a deferred or immediate writelock. SQLiteConnection.BeginTransaction() now has an additional overload to support it
  • Commands are now prepared as they are executed instead of beforehand. This fixes a bug whereby a multi-statement command that alters the database and subsequently references the altered data would fail during Prepare().
  • Tightened up the SQLiteDataReader to prevent reading columns before calling the first Read() and to prevent reading columns after the last Read().
  • A more descriptive error is thrown if there aren't enough parameters in the command to satisfy the parameters required by the statement(s).

1.0.23 - November 21, 2005

  • Named parameters may now begin with @ to ease portability of the provider. SQLite's named parameters are ordinarily prefixed with a : or $. The designer will still use the $ prefix however, since its more compatible with the default SQLite engine.
  • Added several alternate ISO8601 date/time formats to SQLiteConvert.cs to increase compatibility.
  • Relaxed coersion restrictions to work better with SQLite's inherent typelessenss.

1.0.22 - November 11, 2005

  • Fixed some globalization issues which resulted in incorrect case-insensitive comparisons
  • Fixed a bug in the routine that finds all user-defined functions in a loaded assembly. It would throw an exception if any of the types in the assembly could not be loaded. The exception is now caught and handled appropriately.

1.0.21 - November 4, 2005

  • Fixed a designer bug when creating typed datasets with parameterized queries.
  • The above fix then exposed another bug in the datareader's ability to query schema information on parameterized commands, which was also fixed.
  • Compiled against the RTM version of VS2005.
  • Rewrote the design-time install script to use the XML DOM objects when writing to the machine.config and to automatically register the DLL in the GAC.
  • Made changes to the app.config descriptions and help file to improve version-independent factory support.

1.0.20 - October 19, 2005

  • Fixed a shortcut in SQLiteBase.GetValue which was insufficient for international environments. The shortcut was removed and the "proper" procedure put in.

1.0.19 - October 5, 2005

  • Code merge with SQLite 3.2.7
  • Fixed bugs in the CE port code (os_wince.c) which were brought to light by recent changes in the SQLite engine.
  • Recompiled and modified to be compatible with the September VS2005 Release Candidate.
    Beta 2 users should continue to use 1.0.18.1

1.0.18.1 - September 19, 2005

  • Code merge with SQLite 3.2.6

1.0.18 - September 1, 2005

  • Added type-specific method calls when using the various SQLite classes that would've normally returned a a generic Db base class, which aligns the code better with the Microsoft-supplied data providers.

1.0.17 - August 26, 2005

  • Code merge with SQLite 3.2.5
  • Added Itanium and x64 build settings to the project (needs testing)
  • Bugfixes and enhancements to several schema types
  • Additional design-time support to include index and foreign key enumerations. Requires re-registering the designer using INSTALL.CMD. The new designer code now allows the VS query designer and typed datasets to automatically link up foreign keys, use indexes, and automatically generate relationships from the schema.
  • Additional static methods on SQLiteConnection to create a database file, encrypt a file using the Encrypted File System (EFS) on NTFS (requires NT 2K or above) and NTFS file compression

1.0.16 - August 24, 2005

  • Code merge with SQLite 3.2.4 with the large delete bugfix in CVS (which will become 3.2.5 soon)
  • Added new GetSchema() types: IndexColumns, ViewColumns, ForeignKeys

1.0.15 - August 22, 2005

  • Code merge with SQLite 3.2.3
  • Minor updates for better design-time experience. More design-time code to follow in subsequent releases.

1.0.14 - August 16, 2005

  • Fixed a bug in the SQLiteDataAdapter due to insufficient implementation of the class. The RowUpdating and RowUpdated events are now properly implemented, but unfortunately inserting and updating data in a DataTable or DataSet is now much slower. This is the proper design however, so the changes are here to stay.
  • Lots of schema changes to support Visual Studio's Data Designer architecture.
  • Added Designer support for the provider. It's not 100%, but you can design queries, add typed datasets and perform quite a number of tasks all within Visual Studio now.

1.0.13 - August 8, 2005

  • Fixed a named parameter bug in the base SQLite_UTF16 class, which of course only showed up when a database connection was opened using the UseUTF16Encoding=True parameter.
  • Fixed a performance issue in SQLite_UTF16 involving string marshaling.

1.0.12 - August 5, 2005

  • Full support for the Compact Framework. Each build (Debug/Release) now has a platform, either Win32 or Compact Framework. The correct projects are built accordingly. See the Distributing SQLite section for information on what files need to be distributed for each platform.
  • Modified SQLite3.Reset() and Step() functions to transparently handle timeouts while waiting on the database to become available (typically when a writer is waiting on a reader to finish, or a reader is waiting on a writer to finish).
  • Lots of code cleanup as suggested by the Code Analyzer (FxCop).
  • Lots of updates to the helpfile (as you can see).
  • Statements were already prepared lazily in a SQLiteCommand, but now its even more lazy. Statements are now only prepared if the statements haven't been previously prepared and a Prepare() function is called (and the command is associated with a connection) or just prior to the command being executed.

1.0.11 - August 1, 2005

  • For everything except the Compact Framework, System.Data.SQLite.DLL is now the only DLL required to use this provider! The assembly is now a multi-module assembly, containing both the native SQLite3 codebase and the C# classes built on top of it. The Compact Framework version (when completed) will not be able to support this feature, so backwards compatibility with the Compact Framework has been preserved for the future.
  • Fixed a bug in SQLiteCommand.ExecuteScalar() that caused it to stop executing commands once it obtained the first column of the first row-returning resultset. Any remaining statements after the row-returning statement was ignored.

1.0.10 - June 10, 2005

  • Fixed a bug in the SQLite3.cs Prepare() function that created a statement even when the SQLite engine returned a NULL pointer. Typically this occurs when multiple statements are processed and there are trailing comments at the end of the statement.
  • Fixed a bug in SQLiteStatement.cs that retrieved parameter names for a parameterized query. SQLite's parameters are 1-based, and the function was starting at 0. This was fine when all parameters were unnamed, but for named parameters it caused the parameters to be out of whack.

1.0.09a - May 25, 2005

  • Fixed a broken helpfile and corrected some obsolete help remarks in SQLiteFunction.cs
  • Added a version resource to the SQLite.Interop.DLL.

1.0.09 - May 24, 2005

  • Code merge with the latest 3.21 version of SQLite.
  • Removed obsolete methods and properties for Whidbey Beta 2

1.0.08 Refresh - Mar 24, 2005

  • Code merge with the latest 3.20 version of SQLite.
  • Recompiled the help file to fix a build error in it.

1.0.08 - Mar 11, 2005

  • Added additional #if statements to support the old beta 1 edition of VS2005.
  • Code merged the SQLite 3.14 source.

1.0.07 - Mar 5, 2005

  • Made more optimizations to frequently-called functions, resulting in significant performance gains in all tests.
  • Recompiled the binaries using the latest VS2005 February CTP, resulting in yet more significant speed gains. The 100k insert test used to take 3.5 seconds and the insertwithidentity took almost 8 seconds. With the above two changes, those tests are now executing in 1.9 and 4.9 seconds respectively.

1.0.06 - Mar 1, 2005

  • Speed-ups to SQLiteDataReader. It was interop'ing unnecessarily every time it tried to fetch a field due to a logic error.
  • Changed/Added some code to SQLiteConvert's internal DbType, Type and TypeAffinity functions.
  • Fixed the SQLiteDataReader to obey the flags set in the optional CommandBehavior flag from SQLiteCommand.ExecuteReader().
  • Changed the default page size to 1024 to reflect the defaults of SQLite. Ignores the "Page Size" connection string option for memory databases, as tests revealed that changing it resulted in memory corruption errors.
  • Performance enhancements to the SQLiteCommand and SQLiteStatement classes which reduced the 100,000 row insert execution time as well as the various Function execution times significantly.

1.0.05 - Feb 25, 2005

  • Fixed the SQLite3 C# class step/reset functions to accomodate schema changes that invalidate a prepared statement. Statements are recompiled transparently.
  • Moved all native DLL declarations to an UnsafeNativeMethods class.
  • Split several classes into their own modules for readability.
  • Renamed many internal variables, reviewed access to variables marked as internal and altered their protection levels accordingly.
  • Due to the presence of the altered sqlite3 codebase and so many added interop functions, I decided to rename the sqlite3 C project and the DLL to SQLite.Interop.DLL. This is the same core sqlite3 codebase but designed specifically for this ADO.NET provider. This eliminates any possibility of someone dropping another build of sqlite3.dll into the system and rendering the provider inoperable. In the future if the folks at sqlite.org finally introduce a method of retrieving column usage for an arbitrary prepared statement, I'll retool this library to be a lightweight function call wrapper around the core binary distribution.
  • Added [SuppressUnmanagedCodeSecurity] attribute to the UnsafeNativeMethods class which brings VS2005 November CTP execution speeds inline with the December CTP.
  • Added a bin directory to the project root where pre-compiled binaries can be found.
  • Added a doc directory where preliminary documentation on the class library can be found.
  • Documented a lot more of the classes internally.

1.0.04 - Feb 24, 2005

  • Removed the SQLiteContext class and revamped the way UserFunctions work to simplify the imlementation.
  • Fixed a counting bug in the TestCases class, specifically in the function tests where I wasn't resetting the counter and it was consequently reporting intrinsic and raw select calls as being much much faster than they actually were. The numbers are now much closer to what I expected for performance, with .NET user-functions still being the slowest, but only by a small margin.
  • Small performance tweaks to SQLiteDataReader.
  • Added PageSize to the SQLiteConnectionStringBuilder and subsequently to the SQLiteConnection
  • Added a PRAGMA encoding=XXX execution statement to the SQLiteConnection after opening a connection.

1.0.03 - Feb 23, 2005

  • Fixed up SQLiteCommandBuilder to correct implementation errors, which resulted in an enormous performance boost in the InsertMany test. 10,000 row insert that executed in 1500ms now executes in 500ms.
  • Fixed several errors in the SQLite3_UTF16 class. ToString() was working incorrectly and the Open() method failed to register user defined functions and collations.
  • Fixed a bug in SQLiteCommand.ClearCommands() whereby only the first statement was being properly cleaned up.
  • Fixed a bug in SQLiteDataReader whereby calling NextResult() would not properly reset the previously-executed command in the sequence.
  • Added an InsertManyWithIdentityFetch test, which appends a select clause to populate the ID of the last inserted row into the InsertCommand, demonstrating ADO.NET's ability to auto-fetch identity columns on insert.

1.0.02 - Feb 21, 2005

  • Tweaks to the xxx_interop functions that return char *'s, so they also return the length. Saves an interop call to get the UTF-8 string length during conversion to a .NET string.
  • Reworked the whole interop.c thing into interop.h and reduced the code required to merge the main sqlite3 codebase.
  • Added support for user-defined collations.


SQLite Query Syntax
SQLite Language Reference Documentation

SQL As Understood By SQLite

The SQLite library understands most of the standard SQL language. But it does omit some features while at the same time adding a few features of its own. This document attempts to describe precisely what parts of the SQL language SQLite does and does not support. A list of keywords is also provided. In all of the syntax diagrams that follow, literal text is shown in bold blue. Non-terminal symbols are shown in italic red. Operators that are part of the syntactic markup itself are shown in black roman. This document is just an overview of the SQL syntax implemented by SQLite.

SQLite implements the follow syntax:

ALTER TABLE
ANALYZE
ATTACH DATABASE
BEGIN TRANSACTION
comment
COMMIT TRANSACTION
CREATE INDEX
CREATE TABLE
CREATE TRIGGER
CREATE VIEW
CREATE VIRTUAL TABLE
DELETE
DETACH DATABASE
DROP INDEX
DROP TABLE
DROP TRIGGER
DROP VIEW
END TRANSACTION
EXPLAIN
expression
INSERT
ON CONFLICT clause
PRAGMA
REINDEX
REPLACE
ROLLBACK TRANSACTION
SELECT
TYPES
UPDATE
VACUUM


ALTER TABLE
SQLite Language Reference Documentation

SQL As Understood By SQLite

ALTER TABLE

sql-statement ::= | ALTER TABLE [database-name .] table-name alteration
alteration ::= | RENAME TO new-table-name
alteration ::= | ADD [COLUMN] column-def

SQLite's version of the ALTER TABLE command allows the user to rename or add a new column to an existing table. It is not possible to remove a column from a table.

The RENAME TO syntax is used to rename the table identified by [database-name.]table-name to new-table-name. This command cannot be used to move a table between attached databases, only to rename a table within the same database.

If the table being renamed has triggers or indices, then these remain attached to the table after it has been renamed. However, if there are any view definitions, or statements executed by triggers that refer to the table being renamed, these are not automatically modified to use the new table name. If this is required, the triggers or view definitions must be dropped and recreated to use the new table name by hand.

The ADD [COLUMN] syntax is used to add a new column to an existing table. The new column is always appended to the end of the list of existing columns. Column-def may take any of the forms permissable in a CREATE TABLE statement, with the following restrictions:

  • The column may not have a PRIMARY KEY or UNIQUE constraint.
  • The column may not have a default value of CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP.
  • If a NOT NULL constraint is specified, then the column must have a default value other than NULL.

The execution time of the ALTER TABLE command is independent of the amount of data in the table. The ALTER TABLE command runs as quickly on a table with 10 million rows as it does on a table with 1 row.

After ADD COLUMN has been run on a database, that database will not be readable by SQLite version 3.1.3 and earlier until the database is VACUUMed.


ANALYZE
SQLite Language Reference Documentation

SQL As Understood By SQLite

ANALYZE

sql-statement ::= ANALYZE
sql-statement ::= ANALYZE database-name
sql-statement ::= ANALYZE [database-name .] table-name

The ANALYZE command gathers statistics about indices and stores them in a special tables in the database where the query optimizer can use them to help make better index choices. If no arguments are given, all indices in all attached databases are analyzed. If a database name is given as the argument, all indices in that one database are analyzed. If the argument is a table name, then only indices associated with that one table are analyzed.

The initial implementation stores all statistics in a single table named sqlite_stat1. Future enhancements may create additional tables with the same name pattern except with the "1" changed to a different digit. The sqlite_stat1 table cannot be DROPped, but all the content can be DELETEd which has the same effect.


ATTACH DATABASE
SQLite Language Reference Documentation

SQL As Understood By SQLite

ATTACH DATABASE

sql-statement ::= ATTACH [DATABASE] database-filename AS database-name

The ATTACH DATABASE statement adds another database file to the current database connection. If the filename contains punctuation characters it must be quoted. The names 'main' and 'temp' refer to the main database and the database used for temporary tables. These cannot be detached. Attached databases are removed using the DETACH DATABASE statement.

You can read from and write to an attached database and you can modify the schema of the attached database. This is a new feature of SQLite version 3.0. In SQLite 2.8, schema changes to attached databases were not allowed.

You cannot create a new table with the same name as a table in an attached database, but you can attach a database which contains tables whose names are duplicates of tables in the main database. It is also permissible to attach the same database file multiple times.

Tables in an attached database can be referred to using the syntax database-name.table-name. If an attached table doesn't have a duplicate table name in the main database, it doesn't require a database name prefix. When a database is attached, all of its tables which don't have duplicate names become the default table of that name. Any tables of that name attached afterwards require the table prefix. If the default table of a given name is detached, then the last table of that name attached becomes the new default.

Transactions involving multiple attached databases are atomic, assuming that the main database is not ":memory:". If the main database is ":memory:" then transactions continue to be atomic within each individual database file. But if the host computer crashes in the middle of a COMMIT where two or more database files are updated, some of those files might get the changes where others might not. Atomic commit of attached databases is a new feature of SQLite version 3.0. In SQLite version 2.8, all commits to attached databases behaved as if the main database were ":memory:".

There is a compile-time limit of 10 attached database files.


TRANSACTIONS

BEGIN TRANSACTION
SQLite Language Reference Documentation
See Also Example

SQL As Understood By SQLite

BEGIN TRANSACTION

sql-statement ::= BEGIN [ DEFERRED | IMMEDIATE | EXCLUSIVE ] [TRANSACTION [name]]
sql-statement ::= END [TRANSACTION [name]]
sql-statement ::= COMMIT [TRANSACTION [name]]
sql-statement ::= ROLLBACK [TRANSACTION [name]]

Beginning in version 2.0, SQLite supports transactions with rollback and atomic commit.

The optional transaction name is ignored. SQLite currently does not allow nested transactions.

No changes can be made to the database except within a transaction. Any command that changes the database (basically, any SQL command other than SELECT) will automatically start a transaction if one is not already in effect. Automatically started transactions are committed at the conclusion of the command.

Transactions can be started manually using the BEGIN command. Such transactions usually persist until the next COMMIT or ROLLBACK command. But a transaction will also ROLLBACK if the database is closed or if an error occurs and the ROLLBACK conflict resolution algorithm is specified. See the documentation on the ON CONFLICT clause for additional information about the ROLLBACK conflict resolution algorithm.

In SQLite version 3.0.8 and later, transactions can be deferred, immediate, or exclusive. Deferred means that no locks are acquired on the database until the database is first accessed. Thus with a deferred transaction, the BEGIN statement itself does nothing. Locks are not acquired until the first read or write operation. The first read operation against a database creates a SHARED lock and the first write operation creates a RESERVED lock. Because the acquisition of locks is deferred until they are needed, it is possible that another thread or process could create a separate transaction and write to the database after the BEGIN on the current thread has executed. If the transaction is immediate, then RESERVED locks are acquired on all databases as soon as the BEGIN command is executed, without waiting for the database to be used. After a BEGIN IMMEDIATE, you are guaranteed that no other thread or process will be able to write to the database or do a BEGIN IMMEDIATE or BEGIN EXCLUSIVE. Other processes can continue to read from the database, however. An exclusive transaction causes EXCLUSIVE locks to be acquired on all databases. After a BEGIN EXCLUSIVE, you are guaranteed that no other thread or process will be able to read or write the database until the transaction is complete.

A description of the meaning of SHARED, RESERVED, and EXCLUSIVE locks is available separately.

The default behavior for SQLite version 3.0.8 is a deferred transaction. For SQLite version 3.0.0 through 3.0.7, deferred is the only kind of transaction available. For SQLite version 2.8 and earlier, all transactions are exclusive.

The COMMIT command does not actually perform a commit until all pending SQL commands finish. Thus if two or more SELECT statements are in the middle of processing and a COMMIT is executed, the commit will not actually occur until all SELECT statements finish.

An attempt to execute COMMIT might result in an SQLITE_BUSY return code. This indicates that another thread or process had a read lock on the database that prevented the database from being updated. When COMMIT fails in this way, the transaction remains active and the COMMIT can be retried later after the reader has had a chance to clear.


comment
SQLite Language Reference Documentation

SQL As Understood By SQLite

comment

comment ::= | SQL-comment | C-comment
SQL-comment ::= | -- single-line
C-comment ::= | /* multiple-lines [*/]

Comments aren't SQL commands, but can occur in SQL queries. They are treated as whitespace by the parser. They can begin anywhere whitespace can be found, including inside expressions that span multiple lines.

SQL comments only extend to the end of the current line.

C comments can span any number of lines. If there is no terminating delimiter, they extend to the end of the input. This is not treated as an error. A new SQL statement can begin on a line after a multiline comment ends. C comments can be embedded anywhere whitespace can occur, including inside expressions, and in the middle of other SQL statements. C comments do not nest. SQL comments inside a C comment will be ignored.


CREATE INDEX
SQLite Language Reference Documentation

SQL As Understood By SQLite

CREATE INDEX

sql-statement ::= | CREATE [UNIQUE] INDEX [IF NOT EXISTS] [database-name .] index-name ON table-name ( column-name [, column-name]* )
column-name ::= | name [ COLLATE collation-name] [ ASC | DESC ]

The CREATE INDEX command consists of the keywords "CREATE INDEX" followed by the name of the new index, the keyword "ON", the name of a previously created table that is to be indexed, and a parenthesized list of names of columns in the table that are used for the index key. Each column name can be followed by one of the "ASC" or "DESC" keywords to indicate sort order, but the sort order is ignored in the current implementation. Sorting is always done in ascending order.

The COLLATE clause following each column name defines a collating sequence used for text entires in that column. The default collating sequence is the collating sequence defined for that column in the CREATE TABLE statement. Or if no collating sequence is otherwise defined, the built-in BINARY collating sequence is used.

There are no arbitrary limits on the number of indices that can be attached to a single table, nor on the number of columns in an index.

If the UNIQUE keyword appears between CREATE and INDEX then duplicate index entries are not allowed. Any attempt to insert a duplicate entry will result in an error.

The exact text of each CREATE INDEX statement is stored in the sqlite_master or sqlite_temp_master table, depending on whether the table being indexed is temporary. Every time the database is opened, all CREATE INDEX statements are read from the sqlite_master table and used to regenerate SQLite's internal representation of the index layout.

If the optional IF NOT EXISTS clause is present and another index with the same name aleady exists, then this command becomes a no-op.

Indexes are removed with the DROP INDEX command.


CREATE TABLE
SQLite Language Reference Documentation

SQL As Understood By SQLite

CREATE TABLE

sql-command ::= | CREATE [TEMP | TEMPORARY] TABLE [IF NOT EXISTS] [database-name .] table-name ( column-def [, column-def]* [, constraint]* )
sql-command ::= | CREATE [TEMP | TEMPORARY] TABLE [database-name.] table-name AS select-statement
column-def ::= | name [type] [[CONSTRAINT name] column-constraint]*
type ::= | typename | typename ( number ) | typename ( number , number )
column-constraint ::= | NOT NULL [ conflict-clause ] | PRIMARY KEY [sort-order] [ conflict-clause ] [AUTOINCREMENT] | UNIQUE [ conflict-clause ] | CHECK ( expr ) | DEFAULT value | COLLATE collation-name
constraint ::= | PRIMARY KEY ( column-list ) [ conflict-clause ] | UNIQUE ( column-list ) [ conflict-clause ] | CHECK ( expr )
conflict-clause ::= | ON CONFLICT conflict-algorithm

A CREATE TABLE statement is basically the keywords "CREATE TABLE" followed by the name of a new table and a parenthesized list of column definitions and constraints. The table name can be either an identifier or a string. Tables names that begin with "sqlite_" are reserved for use by the engine.

Each column definition is the name of the column followed by the datatype for that column, then one or more optional column constraints. The datatype for the column does not restrict what data may be put in that column. See Datatypes In SQLite Version 3 for additional information. The UNIQUE constraint causes an index to be created on the specified columns. This index must contain unique keys. The COLLATE clause specifies what text collating function to use when comparing text entries for the column. The built-in BINARY collating function is used by default.

The DEFAULT constraint specifies a default value to use when doing an INSERT. The value may be NULL, a string constant or a number. Starting with version 3.1.0, the default value may also be one of the special case-independant keywords CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP. If the value is NULL, a string constant or number, it is literally inserted into the column whenever an INSERT statement that does not specify a value for the column is executed. If the value is CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP, then the current UTC date and/or time is inserted into the columns. For CURRENT_TIME, the format is HH:MM:SS. For CURRENT_DATE, YYYY-MM-DD. The format for CURRENT_TIMESTAMP is "YYYY-MM-DD HH:MM:SS".

Specifying a PRIMARY KEY normally just creates a UNIQUE index on the corresponding columns. However, if primary key is on a single column that has datatype INTEGER, then that column is used internally as the actual key of the B-Tree for the table. This means that the column may only hold unique integer values. (Except for this one case, SQLite ignores the datatype specification of columns and allows any kind of data to be put in a column regardless of its declared datatype.) If a table does not have an INTEGER PRIMARY KEY column, then the B-Tree key will be a automatically generated integer. The B-Tree key for a row can always be accessed using one of the special names "ROWID", "OID", or "_ROWID_". This is true regardless of whether or not there is an INTEGER PRIMARY KEY. An INTEGER PRIMARY KEY column man also include the keyword AUTOINCREMENT. The AUTOINCREMENT keyword modified the way that B-Tree keys are automatically generated. Additional detail on automatic B-Tree key generation is available separately.

If the "TEMP" or "TEMPORARY" keyword occurs in between "CREATE" and "TABLE" then the table that is created is only visible within that same database connection and is automatically deleted when the database connection is closed. Any indices created on a temporary table are also temporary. Temporary tables and indices are stored in a separate file distinct from the main database file.

If a <database-name> is specified, then the table is created in the named database. It is an error to specify both a <database-name> and the TEMP keyword, unless the <database-name> is "temp". If no database name is specified, and the TEMP keyword is not present, the table is created in the main database.

The optional conflict-clause following each constraint allows the specification of an alternative default constraint conflict resolution algorithm for that constraint. The default is abort ABORT. Different constraints within the same table may have different default conflict resolution algorithms. If an COPY, INSERT, or UPDATE command specifies a different conflict resolution algorithm, then that algorithm is used in place of the default algorithm specified in the CREATE TABLE statement. See the section titled ON CONFLICT for additional information.

CHECK constraints are supported as of version 3.3.0. Prior to version 3.3.0, CHECK constraints were parsed but not enforced.

There are no arbitrary limits on the number of columns or on the number of constraints in a table. The total amount of data in a single row is limited to about 1 megabytes in version 2.8. In version 3.0 there is no arbitrary limit on the amount of data in a row.

The CREATE TABLE AS form defines the table to be the result set of a query. The names of the table columns are the names of the columns in the result.

The exact text of each CREATE TABLE statement is stored in the sqlite_master table. Every time the database is opened, all CREATE TABLE statements are read from the sqlite_master table and used to regenerate SQLite's internal representation of the table layout. If the original command was a CREATE TABLE AS then then an equivalent CREATE TABLE statement is synthesized and store in sqlite_master in place of the original command. The text of CREATE TEMPORARY TABLE statements are stored in the sqlite_temp_master table.

If the optional IF NOT EXISTS clause is present and another table with the same name aleady exists, then this command becomes a no-op.

Tables are removed using the DROP TABLE statement.


CREATE TABLE

CREATE TRIGGER
SQLite Language Reference Documentation
See Also Example

SQL As Understood By SQLite

CREATE TRIGGER

sql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER trigger-name [ BEFORE | AFTER ]
database-event ON [database-name .] table-name
trigger-action
sql-statement ::= CREATE [TEMP | TEMPORARY] TRIGGER trigger-name INSTEAD OF
database-event ON [database-name .] view-name
trigger-action
database-event ::= DELETE |
INSERT |
UPDATE |
UPDATE OF column-list
trigger-action ::= [ FOR EACH ROW | FOR EACH STATEMENT ] [ WHEN expression ]
BEGIN
trigger-step ; [ trigger-step ; ]*
END
trigger-step ::= update-statement | insert-statement |
delete-statement | select-statement

The CREATE TRIGGER statement is used to add triggers to the database schema. Triggers are database operations (the trigger-action) that are automatically performed when a specified database event (the database-event) occurs.

A trigger may be specified to fire whenever a DELETE, INSERT or UPDATE of a particular database table occurs, or whenever an UPDATE of one or more specified columns of a table are updated.

At this time SQLite supports only FOR EACH ROW triggers, not FOR EACH STATEMENT triggers. Hence explicitly specifying FOR EACH ROW is optional. FOR EACH ROW implies that the SQL statements specified as trigger-steps may be executed (depending on the WHEN clause) for each database row being inserted, updated or deleted by the statement causing the trigger to fire.

Both the WHEN clause and the trigger-steps may access elements of the row being inserted, deleted or updated using references of the form "NEW.column-name" and "OLD.column-name", where column-name is the name of a column from the table that the trigger is associated with. OLD and NEW references may only be used in triggers on trigger-events for which they are relevant, as follows:

INSERT | NEW references are valid
UPDATE | NEW and OLD references are valid
DELETE | OLD references are valid

If a WHEN clause is supplied, the SQL statements specified as trigger-steps are only executed for rows for which the WHEN clause is true. If no WHEN clause is supplied, the SQL statements are executed for all rows.

The specified trigger-time determines when the trigger-steps will be executed relative to the insertion, modification or removal of the associated row.

An ON CONFLICT clause may be specified as part of an UPDATE or INSERT trigger-step. However if an ON CONFLICT clause is specified as part of the statement causing the trigger to fire, then this conflict handling policy is used instead.

Triggers are automatically dropped when the table that they are associated with is dropped.

Triggers may be created on views, as well as ordinary tables, by specifying INSTEAD OF in the CREATE TRIGGER statement. If one or more ON INSERT, ON DELETE or ON UPDATE triggers are defined on a view, then it is not an error to execute an INSERT, DELETE or UPDATE statement on the view, respectively. Thereafter, executing an INSERT, DELETE or UPDATE on the view causes the associated triggers to fire. The real tables underlying the view are not modified (except possibly explicitly, by a trigger program).

Example:

Assuming that customer records are stored in the "customers" table, and that order records are stored in the "orders" table, the following trigger ensures that all associated orders are redirected when a customer changes his or her address:

CREATE TRIGGER update_customer_address UPDATE OF address ON customers
  BEGIN
    UPDATE orders SET address = new.address WHERE customer_name = old.name;
  END;

With this trigger installed, executing the statement:

UPDATE customers SET address = '1 Main St.' WHERE name = 'Jack Jones';

causes the following to be automatically executed:

UPDATE orders SET address = '1 Main St.' WHERE customer_name = 'Jack Jones';

Note that currently, triggers may behave oddly when created on tables with INTEGER PRIMARY KEY fields. If a BEFORE trigger program modifies the INTEGER PRIMARY KEY field of a row that will be subsequently updated by the statement that causes the trigger to fire, then the update may not occur. The workaround is to declare the table with a PRIMARY KEY column instead of an INTEGER PRIMARY KEY column.

A special SQL function RAISE() may be used within a trigger-program, with the following syntax

raise-function ::= RAISE ( ABORT, error-message ) |
RAISE ( FAIL, error-message ) |
RAISE ( ROLLBACK, error-message ) |
RAISE ( IGNORE )

When one of the first three forms is called during trigger-program execution, the specified ON CONFLICT processing is performed (either ABORT, FAIL or ROLLBACK) and the current query terminates. An error code of SQLITE_CONSTRAINT is returned to the user, along with the specified error message.

When RAISE(IGNORE) is called, the remainder of the current trigger program, the statement that caused the trigger program to execute and any subsequent trigger programs that would of been executed are abandoned. No database changes are rolled back. If the statement that caused the trigger program to execute is itself part of a trigger program, then that trigger program resumes execution at the beginning of the next step.

Triggers are removed using the DROP TRIGGER statement.


CREATE VIEW
SQLite Language Reference Documentation

SQL As Understood By SQLite

CREATE VIEW

sql-command ::= CREATE [TEMP | TEMPORARY] VIEW [database-name.] view-name AS select-statement

The CREATE VIEW command assigns a name to a pre-packaged SELECT statement. Once the view is created, it can be used in the FROM clause of another SELECT in place of a table name.

If the "TEMP" or "TEMPORARY" keyword occurs in between "CREATE" and "VIEW" then the view that is created is only visible to the process that opened the database and is automatically deleted when the database is closed.

If a <database-name> is specified, then the view is created in the named database. It is an error to specify both a <database-name> and the TEMP keyword, unless the <database-name> is "temp". If no database name is specified, and the TEMP keyword is not present, the table is created in the main database.

You cannot COPY, DELETE, INSERT or UPDATE a view. Views are read-only in SQLite. However, in many cases you can use a TRIGGER on the view to accomplish the same thing. Views are removed with the DROP VIEW command.


CREATE VIRTUAL TABLE
SQLite Language Reference Documentation

SQL As Understood By SQLite

CREATE VIRTUAL TABLE

sql-command ::= CREATE VIRTUAL TABLE [database-name .] table-name USING module-name [( arguments )]

A virtual table is an interface to an external storage or computation engine that appears to be a table but does not actually store information in the database file.

In general, you can do anything with a virtual table that can be done with an ordinary table, except that you cannot create triggers on a virtual table. Some virtual table implementations might impose additional restrictions. For example, many virtual tables are read-only.

The <module-name> is the name of an object that implements the virtual table. The <module-name> must be registered with the SQLite database connection using sqlite3_create_module prior to issuing the CREATE VIRTUAL TABLE statement. The module takes zero or more comma-separated arguments. The arguments can be just about any text as long as it has balanced parentheses. The argument syntax is sufficiently general that the arguments can be made to appear as column definitions in a traditional CREATE TABLE statement. SQLite passes the module arguments directly to the module without any interpretation. It is the responsibility of the module implementation to parse and interpret its own arguments.

A virtual table is destroyed using the ordinary DROP TABLE statement. There is no DROP VIRTUAL TABLE statement.


DELETE
SQLite Language Reference Documentation

SQL As Understood By SQLite

DELETE

sql-statement ::= DELETE FROM [database-name .] table-name [WHERE expr]

The DELETE command is used to remove records from a table. The command consists of the "DELETE FROM" keywords followed by the name of the table from which records are to be removed.

Without a WHERE clause, all rows of the table are removed. If a WHERE clause is supplied, then only those rows that match the expression are removed.


DETACH
SQLite Language Reference Documentation

SQL As Understood By SQLite

DETACH

sql-command ::= DETACH [DATABASE] database-name

This statement detaches an additional database connection previously attached using the ATTACH DATABASE statement. It is possible to have the same database file attached multiple times using different names, and detaching one connection to a file will leave the others intact.

This statement will fail if SQLite is in the middle of a transaction.


DROP INDEX
SQLite Language Reference Documentation

SQL As Understood By SQLite

DROP INDEX

sql-command ::= DROP INDEX [IF EXISTS] [database-name .] index-name

The DROP INDEX statement removes an index added with the CREATE INDEX statement. The index named is completely removed from the disk. The only way to recover the index is to reenter the appropriate CREATE INDEX command.

The DROP INDEX statement does not reduce the size of the database file in the default mode. Empty space in the database is retained for later INSERTs. To remove free space in the database, use the VACUUM command. If AUTOVACUUM mode is enabled for a database then space will be freed automatically by DROP INDEX.


DROP TABLE
SQLite Language Reference Documentation

SQL As Understood By SQLite

DROP TABLE

sql-command ::= DROP TABLE [IF EXISTS] [database-name.] table-name

The DROP TABLE statement removes a table added with the CREATE TABLE statement. The name specified is the table name. It is completely removed from the database schema and the disk file. The table can not be recovered. All indices associated with the table are also deleted.

The DROP TABLE statement does not reduce the size of the database file in the default mode. Empty space in the database is retained for later INSERTs. To remove free space in the database, use the VACUUM command. If AUTOVACUUM mode is enabled for a database then space will be freed automatically by DROP TABLE.

The optional IF EXISTS clause suppresses the error that would normally result if the table does not exist.


DROP TRIGGER
SQLite Language Reference Documentation

SQL As Understood By SQLite

DROP TRIGGER

sql-statement ::= DROP TRIGGER [database-name .] trigger-name

The DROP TRIGGER statement removes a trigger created by the CREATE TRIGGER statement. The trigger is deleted from the database schema. Note that triggers are automatically dropped when the associated table is dropped.


DROP VIEW
SQLite Language Reference Documentation

SQL As Understood By SQLite

DROP VIEW

sql-command ::= DROP VIEW view-name

The DROP VIEW statement removes a view created by the CREATE VIEW statement. The name specified is the view name. It is removed from the database schema, but no actual data in the underlying base tables is modified.


EXPLAIN
SQLite Language Reference Documentation

SQL As Understood By SQLite

EXPLAIN

sql-statement ::= EXPLAIN sql-statement

The EXPLAIN command modifier is a non-standard extension. The idea comes from a similar command found in PostgreSQL, but the operation is completely different.

If the EXPLAIN keyword appears before any other SQLite SQL command then instead of actually executing the command, the SQLite library will report back the sequence of virtual machine instructions it would have used to execute the command had the EXPLAIN keyword not been present. For additional information about virtual machine instructions see the architecture description or the documentation on available opcodes for the virtual machine.


expression
SQLite Language Reference Documentation

SQL As Understood By SQLite

expression

expr ::= | expr binary-op expr | expr [NOT] like-op expr [ESCAPE expr] | unary-op expr | ( expr ) | column-name | table-name . column-name | database-name . table-name . column-name | literal-value | parameter | function-name ( expr-list | * ) | expr ISNULL | expr NOTNULL | expr [NOT] BETWEEN expr AND expr | expr [NOT] IN ( value-list ) | expr [NOT] IN ( select-statement ) | expr [NOT] IN [database-name .] table-name | [EXISTS] ( select-statement ) | CASE [expr] ( WHEN expr THEN expr )+ [ELSE expr] END | CAST ( expr AS type )
like-op ::= | LIKE | GLOB | REGEXP | MATCH

This section is different from the others. Most other sections of this document talks about a particular SQL command. This section does not talk about a standalone command but about "expressions" which are subcomponents of most other commands.

SQLite understands the following binary operators, in order from highest to lowest precedence:

|| * / % + - << >> & | < <= >
  >= = == != <> IN AND OR

Supported unary operators are these:

- + ! ~ NOT

The unary operator [Operator +] is a no-op. It can be applied to strings, numbers, or blobs and it always gives as its result the value of the operand.

Note that there are two variations of the equals and not equals operators. Equals can be either = or ==. The non-equals operator can be either != or <>. The || operator is "concatenate" - it joins together the two strings of its operands. The operator % outputs the remainder of its left operand modulo its right operand.

The result of any binary operator is a numeric value, except for the || concatenation operator which gives a string result.

A literal value is an integer number or a floating point number. Scientific notation is supported. The "." character is always used as the decimal point even if the locale setting specifies "," for this role - the use of "," for the decimal point would result in syntactic ambiguity. A string constant is formed by enclosing the string in single quotes ('). A single quote within the string can be encoded by putting two single quotes in a row - as in Pascal. C-style escapes using the backslash character are not supported because they are not standard SQL. BLOB literals are string literals containing hexadecimal data and preceded by a single "x" or "X" character. For example:

X'53514697465'

A literal value can also be the token "NULL".

A parameter specifies a placeholder in the expression for a literal value that is filled in at runtime using the sqlite3_bind API. Parameters can take several forms:

?NNN | A question mark followed by a number NNN holds a spot for the NNN-th parameter. NNN must be between 1 and 999.
? | A question mark that is not followed by a number holds a spot for the next unused parameter.
:AAAA | A colon followed by an identifier name holds a spot for a named parameter with the name AAAA. Named parameters are also numbered. The number assigned is the next unused number. To avoid confusion, it is best to avoid mixing named and numbered parameters.
@AAAA | An "at" sign works exactly like a colon.
$AAAA | A dollar-sign followed by an identifier name also holds a spot for a named parameter with the name AAAA. The identifier name in this case can include one or more occurances of "::" and a suffix enclosed in "(...)" containing any text at all. This syntax is the form of a variable name in the Tcl programming language.

Parameters that are not assigned values using sqlite3_bind are treated as NULL.

The LIKE operator does a pattern matching comparison. The operand to the right contains the pattern, the left hand operand contains the string to match against the pattern. A percent symbol % in the pattern matches any sequence of zero or more characters in the string. An underscore _ in the pattern matches any single character in the string. Any other character matches itself or it's lower/upper case equivalent (i.e. case-insensitive matching). (A bug: SQLite only understands upper/lower case for 7-bit Latin characters. Hence the LIKE operator is case sensitive for 8-bit iso8859 characters or UTF-8 characters. For example, the expression 'a' LIKE 'A' is TRUE but 'æ' LIKE 'Æ' is FALSE.).

If the optional ESCAPE clause is present, then the expression following the ESCAPE keyword must evaluate to a string consisting of a single character. This character may be used in the LIKE pattern to include literal percent or underscore characters. The escape character followed by a percent symbol, underscore or itself matches a literal percent symbol, underscore or escape character in the string, respectively. The infix LIKE operator is implemented by calling the user function like(X,Y).

The LIKE operator is not case sensitive and will match upper case characters on one side against lower case characters on the other. (A bug: SQLite only understands upper/lower case for 7-bit Latin characters. Hence the LIKE operator is case sensitive for 8-bit iso8859 characters or UTF-8 characters. For example, the expression 'a' LIKE 'A' is TRUE but 'æ' LIKE 'Æ' is FALSE.).

The infix LIKE operator is implemented by calling the user function like(X,Y). If an ESCAPE clause is present, it adds a third parameter to the function call. If the functionality of LIKE can be overridden by defining an alternative implementation of the like() SQL function.

The GLOB operator is similar to LIKE but uses the Unix file globbing syntax for its wildcards. Also, GLOB is case sensitive, unlike LIKE. Both GLOB and LIKE may be preceded by the NOT keyword to invert the sense of the test. The infix GLOB operator is implemented by calling the user function glob(X,Y) and can be modified by overriding that function.

The REGEXP operator is a special syntax for the regexp() user function. No regexp() user function is defined by default and so use of the REGEXP operator will normally result in an error message. If a user-defined function named "regexp" is added at run-time, that function will be called in order to implement the REGEXP operator.

The MATCH operator is a special syntax for the match() user function. The default match() function implementation raises and exception and is not really useful for anything. But extensions can override the match() function with more helpful logic.

A column name can be any of the names defined in the CREATE TABLE statement or one of the following special identifiers: "ROWID", "OID", or "_ROWID_". These special identifiers all describe the unique random integer key (the "row key") associated with every row of every table. The special identifiers only refer to the row key if the CREATE TABLE statement does not define a real column with the same name. Row keys act like read-only columns. A row key can be used anywhere a regular column can be used, except that you cannot change the value of a row key in an UPDATE or INSERT statement. "SELECT * ..." does not return the row key.

SELECT statements can appear in expressions as either the right-hand operand of the IN operator, as a scalar quantity, or as the operand of an EXISTS operator. As a scalar quantity or the operand of an IN operator, the SELECT should have only a single column in its result. Compound SELECTs (connected with keywords like UNION or EXCEPT) are allowed. With the EXISTS operator, the columns in the result set of the SELECT are ignored and the expression returns TRUE if one or more rows exist and FALSE if the result set is empty. If no terms in the SELECT expression refer to value in the containing query, then the expression is evaluated once prior to any other processing and the result is reused as necessary. If the SELECT expression does contain variables from the outer query, then the SELECT is reevaluated every time it is needed.

When a SELECT is the right operand of the IN operator, the IN operator returns TRUE if the result of the left operand is any of the values generated by the select. The IN operator may be preceded by the NOT keyword to invert the sense of the test.

When a SELECT appears within an expression but is not the right operand of an IN operator, then the first row of the result of the SELECT becomes the value used in the expression. If the SELECT yields more than one result row, all rows after the first are ignored. If the SELECT yields no rows, then the value of the SELECT is NULL.

A CAST expression changes the datatype of the into the type specified by <type>. <type> can be any non-empty type name that is valid for the type in a column definition of a CREATE TABLE statement.

Both simple and aggregate functions are supported. A simple function can be used in any expression. Simple functions return a result immediately based on their inputs. Aggregate functions may only be used in a SELECT statement. Aggregate functions compute their result across all rows of the result set.

Core Functions

The core functions shown below are available by default. Additional functions may be written in C and added to the database engine using the sqlite3_create_function() API.

abs(X) | Return the absolute value of argument X.
coalesce(X,Y,...) | Return a copy of the first non-NULL argument. If all arguments are NULL then NULL is returned. There must be at least 2 arguments.
glob(X,Y) | This function is used to implement the "X GLOB Y" syntax of SQLite. The sqlite3_create_function() interface can be used to override this function and thereby change the operation of the GLOB operator.
ifnull(X,Y) | Return a copy of the first non-NULL argument. If both arguments are NULL then NULL is returned. This behaves the same as coalesce() above.
last_insert_rowid() | Return the ROWID of the last row insert from this connection to the database. This is the same value that would be returned from the sqlite_last_insert_rowid() API function.
length(X) | Return the string length of X in characters. If SQLite is configured to support UTF-8, then the number of UTF-8 characters is returned, not the number of bytes.
like(X,Y [,Z]) | This function is used to implement the "X LIKE Y [ESCAPE Z]" syntax of SQL. If the optional ESCAPE clause is present, then the user-function is invoked with three arguments. Otherwise, it is invoked with two arguments only. The sqlite_create_function() interface can be used to override this function and thereby change the operation of the LIKE operator. When doing this, it may be important to override both the two and three argument versions of the like() function. Otherwise, different code may be called to implement the LIKE operator depending on whether or not an ESCAPE clause was specified.
load_extension(X) load_extension(X,Y) | Load SQLite extensions out of the shared library file named X using the entry point Y. The result is a NULL. If Y is omitted then the default entry point of sqlite3_extension_init is used. This function raises an exception if the extension fails to load or initialize correctly.
lower(X) | Return a copy of string X will all characters converted to lower case. The C library tolower() routine is used for the conversion, which means that this function might not work correctly on UTF-8 characters.
max(X,Y,...) | Return the argument with the maximum value. Arguments may be strings in addition to numbers. The maximum value is determined by the usual sort order. Note that max() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.
min(X,Y,...) | Return the argument with the minimum value. Arguments may be strings in addition to numbers. The minimum value is determined by the usual sort order. Note that min() is a simple function when it has 2 or more arguments but converts to an aggregate function if given only a single argument.
nullif(X,Y) | Return the first argument if the arguments are different, otherwise return NULL.
quote(X) | This routine returns a string which is the value of its argument suitable for inclusion into another SQL statement. Strings are surrounded by single-quotes with escapes on interior quotes as needed. BLOBs are encoded as hexadecimal literals. The current implementation of VACUUM uses this function. The function is also useful when writing triggers to implement undo/redo functionality.
random(*) | Return a pseudo-random integer between -9223372036854775808 and +9223372036854775807.
round(X) round(X,Y) | Round off the number X to Y digits to the right of the decimal point. If the Y argument is omitted, 0 is assumed.
soundex(X) | Compute the soundex encoding of the string X. The string "?000" is returned if the argument is NULL. This function is omitted from SQLite by default. It is only available the -DSQLITE_SOUNDEX=1 compiler option is used when SQLite is built.
sqlite_version(*) | Return the version string for the SQLite library that is running. Example: "2.8.0"
substr(X,Y,Z) | Return a substring of input string X that begins with the Y-th character and which is Z characters long. The left-most character of X is number 1. If Y is negative the the first character of the substring is found by counting from the right rather than the left. If SQLite is configured to support UTF-8, then characters indices refer to actual UTF-8 characters, not bytes.
typeof(X) | Return the type of the expression X. The only return values are "null", "integer", "real", "text", and "blob". SQLite's type handling is explained in Datatypes in SQLite Version 3.
upper(X) | Return a copy of input string X converted to all upper-case letters. The implementation of this function uses the C library routine toupper() which means it may not work correctly on UTF-8 strings.

Aggregate Functions

The aggregate functions shown below are available by default. Additional aggregate functions written in C may be added using the sqlite3_create_function() API.

In any aggregate function that takes a single argument, that argument can be preceeded by the keyword DISTINCT. In such cases, duplicate elements are filtered before being passed into the aggregate function. For example, the function "count(distinct X)" will return the number of distinct values of column X instead of the total number of non-null values in column X.

avg(X) Return the average value of all non-NULL X within a group. String and BLOB values that do not look like numbers are interpreted as 0. The result of avg() is always a floating point value even if all inputs are integers.

count(X)
count(*) 		The first form return a count of the number of times that X is not NULL in a group. The second form (with no argument) returns the total number of rows in the group.
max(X) | Return the maximum value of all values in the group. The usual sort order is used to determine the maximum.
min(X) | Return the minimum non-NULL value of all values in the group. The usual sort order is used to determine the minimum. NULL is only returned if all values in the group are NULL.
sum(X)
total(X) 		Return the numeric sum of all non-NULL values in the group. If there are no non-NULL input rows then sum() returns NULL but total() returns 0.0. NULL is not normally a helpful result for the sum of no rows but the SQL standard requires it and most other SQL database engines implement sum() that way so SQLite does it in the same way in order to be compatible. The non-standard total() function is provided as a convenient way to work around this design problem in the SQL language.

The result of total() is always a floating point value. The result of sum() is an integer value if all non-NULL inputs are integers. If any input to sum() is neither an integer or a NULL then sum() returns a floating point value which might be an approximation to the true sum.

Sum() will throw an "integer overflow" exception if all inputs are integers or NULL and an integer overflow occurs at any point during the computation. Total() never throws an exception.


DateTime Functions

Date and Time Functions
SQLite Language Reference Documentation
See Also Example

Date and Time Functions

Five date and time functions are available, as follows:

  1. date( timestring, modifier, modifier, ...)
  2. time( timestring, modifier, modifier, ...)
  3. datetime( timestring, modifier, modifier, ...)
  4. julianday( timestring, modifier, modifier, ...)
  5. strftime( format, timestring, modifier, modifier, ...)

All five functions take a time string as an argument. This time string may be followed by zero or more modifiers. The strftime() function also takes a format string as its first argument.

The date() function returns the date in this format: YYYY-MM-DD. The time() function returns the time as HH:MM:SS. The datetime() function returns "YYYY-MM-DD HH:MM:SS". The julianday() function returns the number of days since noon in Greenwich on November 24, 4714 B.C. The julian day number is the preferred internal representation of dates. The strftime() routine returns the date formatted according to the format string specified as the first argument. The format string supports most, but not all, of the more common substitutions found in the strftime() function from the standard C library:

   %d  day of month
   %f  ** fractional seconds  SS.SSS
   %H  hour 00-24
   %j  day of year 001-366
   %J  ** Julian day number
   %m  month 01-12
   %M  minute 00-59
   %s  seconds since 1970-01-01
   %S  seconds 00-59
   %w  day of week 0-6  sunday==0
   %W  week of year 00-53
   %Y  year 0000-9999
   %%  %

The %f and %J conversions are new. Notice that all of the other four functions could be expressed in terms of strftime().

   date(...)      ->  strftime("%Y-%m-%d", ...)
   time(...)      ->  strftime("%H:%M:%S", ...)
   datetime(...)  ->  strftime("%Y-%m-%d %H:%M:%S", ...)
   julianday(...) ->  strftime("%J", ...)

The only reasons for providing functions other than strftime() is for convenience and for efficiency.

Time Strings

A time string can be in any of the following formats:

  1. YYYY-MM-DD
  2. YYYY-MM-DD HH:MM
  3. YYYY-MM-DD HH:MM:SS
  4. YYYY-MM-DD HH:MM:SS.SSS
  5. YYYY-MM-DDTHH:MM
  6. YYYY-MM-DDTHH:MM:SS
  7. YYYY-MM-DDTHH:MM:SS.SSS
  8. HH:MM
  9. HH:MM:SS
  10. HH:MM:SS.SSS
  11. now
  12. DDDD.DDDD

In formats 5 through 7, the "T" is a literal character separating the date and the time, as required by the ISO-8601 standard. These formats are supported in SQLite 3.2.0 and later. Formats 8 through 10 that specify only a time assume a date of 2000-01-01. Format 11, the string 'now', is converted into the current date and time. Universal Coordinated Time (UTC) is used. Format 12 is the julian day number expressed as a floating point value.

Modifiers

The time string can be followed by zero or more modifiers that alter the date or alter the interpretation of the date. The available modifiers are as follows.

  1. NNN days
  2. NNN hours
  3. NNN minutes
  4. NNN.NNNN seconds
  5. NNN months (see #551 and [1163] )
  6. NNN years (see #551 and [1163] )
  7. start of month
  8. start of year
  9. start of week (withdrawn -- will not be implemented)
  10. start of day
  11. weekday N (see #551 and [1163] )
  12. unixepoch
  13. localtime
  14. utc

The first six modifiers (1 through 6) simply add the specified amount of time to the date specified by the preceding timestring.

The "start of" modifiers (7 through 10) shift the date backwards to the beginning of the current month, year or day.

The "weekday" modifier advances the date forward to the next date where the weekday number is N. Sunday is 0, Monday is 1, and so forth.

The "unixepoch" modifier (12) only works if it immediately follows a timestring in the DDDDDDDDDD format. This modifier causes the DDDDDDDDDD to be interpreted not as a julian day number as it normally would be, but as the number of seconds since 1970. This modifier allows unix-based times to be converted to julian day numbers easily.

The "localtime" modifier (13) adjusts the previous time string so that it displays the correct local time. "utc" undoes this.

Examples

Compute the current date.

  SELECT date('now');

Compute the last day of the current month.

  SELECT date('now','start of month','+1 month','-1 day');

Compute the date and time given a unix timestamp 1092941466.

  SELECT datetime(1092941466, 'unixepoch');

Compute the date and time given a unix timestamp 1092941466, and compensate for your local timezone.

  SELECT datetime(1092941466, 'unixepoch', 'localtime');

Compute the current unix timestamp.

  SELECT strftime('%s','now');

Compute the number of days since the battle of Hastings.

  SELECT julianday('now') - julianday('1066-10-14','gregorian');

Compute the number of seconds between two dates:

  SELECT julianday('now')*86400 - julianday('2004-01-01 02:34:56')*86400;

Compute the date of the first Tuesday in October (January + 9) for the current year.

  SELECT date('now','start of year','+9 months','weekday 2');

Caveats And Bugs

The computation of local time depends heavily on the whim of local politicians and is thus difficult to get correct for all locales. In this implementation, the standard C library function localtime() is used to assist in the calculation of local time. Note that localtime() is not threadsafe, so use of the "localtime" modifier is not threadsafe. Also, the localtime() C function normally only works for years between 1970 and 2037. For dates outside this range, SQLite attempts to map the year into an equivalent year within this range, do the calculation, then map the year back.

Please surround uses of localtime() with sqliteOsEnterMutex() and sqliteOsLeaveMutex() so threads using SQLite are protected, at least! -- e It is so. --drh

[Consider instead, using localtime_r which is reentrant and may be used *without* expensive mutex locking. Although non-standard it's available on most Unixes --hauk] But it is not available on windows, as far as I am aware. --drh On windows localtime() is thread-safe if the MT C runtime is used. The MT runtime uses thread-local storage for the static variables, the kind functions use.--gr [What about using localtime_r, and on systems where it is unavailable defining it as sqliteOsEnterMutext() ; locatime() ; sqliteOsLeaveMutex() so that non-windows systems get the maximum advantage, with almost zero code impact?] The autoconfigury and patch for localtime_r is here: ¤ http://www.sqlite.org/cvstrac/tktview?tn=1906 . I'm curious why this obvious fix is not applied. gmtime() also suffers from this same threadsafety problem.

Date computations do not give correct results for dates before Julian day number 0 (-4713-11-24 12:00:00).

All internal computations assume the Gregorian calendar system.

An anonymous user adds:
For my use I added new functions and functionalities to the date functions that come with the sqlite 3.3.0 (can be used in older versions as well with small effort).

In main lines they are as follows:

  1. NNN days
  2. NNN hours
  3. NNN minutes
  4. NNN.NNNN seconds
  5. NNN months (see #551 and [1163] )
  6. NNN years (see #551 and [1163] )
  7. start of month
  8. start of year
  9. start of week (!!! implemented)
  10. start of day
  11. weekday N (see #551 and [1163] )
  12. unixepoch
  13. localtime
  14. utc
  15. julian (not implemented as of 2004-01-05)
  16. gregorian (not implemented as of 2004-01-05)
  17. start of minute
  18. start of hour
  19. end of minute
  20. end of hour
  21. end of day
  22. end of week
  23. end of month
  24. end of year
  25. group seconds by
  26. group minutes by
  27. group hours by
  28. group days by
  29. group weeks by
  30. group months by
  31. group years by

The "start of" modifiers (7 through 10 and 17 through 18) shift the date backwards to the beginning of the current minute, hour, week, month, year or day.

The "end of" modifiers (19 through 24) shift the date forwards to the end of the current minute, hour, week, month, year or day.

The "group * by" modifiers (25 through 31) round the date to the closest backward multiple supplied, with some limitations, to the current seconds (1 through 30), minutes (1 through 30), hours (1 through 12), days (1 through 15), weeks (1 through 26), months (1 through 6), years (1 through 100), these limitations are due to dont complicate the calculations when a multiple can span beyound the unit modified.

Ex:

SELECT datetime('2006-02-04 20:09:23','group hours by 3'); => '2006-02-04 18:00:00'

SELECT datetime('2006-02-05 20:09:23','group days by 3'); => '2006-02-04 00:00:00'

New functions "week_number(date)" returns the week number of the year on the supplied date parameter, "datetime2seconds(datetime)" return the number of seconds from the supplied datetime parameter.


INSERT
SQLite Language Reference Documentation

SQL As Understood By SQLite

INSERT

sql-statement ::= INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] VALUES(value-list) |
INSERT [OR conflict-algorithm] INTO [database-name .] table-name [(column-list)] select-statement

The INSERT statement comes in two basic forms. The first form (with the "VALUES" keyword) creates a single new row in an existing table. If no column-list is specified then the number of values must be the same as the number of columns in the table. If a column-list is specified, then the number of values must match the number of specified columns. Columns of the table that do not appear in the column list are filled with the default value, or with NULL if not default value is specified.

The second form of the INSERT statement takes it data from a SELECT statement. The number of columns in the result of the SELECT must exactly match the number of columns in the table if no column list is specified, or it must match the number of columns name in the column list. A new entry is made in the table for every row of the SELECT result. The SELECT may be simple or compound. If the SELECT statement has an ORDER BY clause, the ORDER BY is ignored.

The optional conflict-clause allows the specification of an alternative constraint conflict resolution algorithm to use during this one command. See the section titled ON CONFLICT for additional information. For compatibility with MySQL, the parser allows the use of the single keyword REPLACE as an alias for "INSERT OR REPLACE".


ON CONFLICT

ON CONFLICT clause
SQLite Language Reference Documentation
See Also Example

SQL As Understood By SQLite

ON CONFLICT clause

conflict-clause ::= | ON CONFLICT conflict-algorithm
conflict-algorithm ::= | ROLLBACK | ABORT | FAIL | IGNORE | REPLACE

The ON CONFLICT clause is not a separate SQL command. It is a non-standard clause that can appear in many other SQL commands. It is given its own section in this document because it is not part of standard SQL and therefore might not be familiar.

The syntax for the ON CONFLICT clause is as shown above for the CREATE TABLE command. For the INSERT and UPDATE commands, the keywords "ON CONFLICT" are replaced by "OR", to make the syntax seem more natural. For example, instead of "INSERT ON CONFLICT IGNORE" we have "INSERT OR IGNORE". The keywords change but the meaning of the clause is the same either way.

The ON CONFLICT clause specifies an algorithm used to resolve constraint conflicts. There are five choices: ROLLBACK, ABORT, FAIL, IGNORE, and REPLACE. The default algorithm is ABORT. This is what they mean:

ROLLBACK

When a constraint violation occurs, an immediate ROLLBACK occurs, thus ending the current transaction, and the command aborts with a return code of SQLITE_CONSTRAINT. If no transaction is active (other than the implied transaction that is created on every command) then this algorithm works the same as ABORT.

ABORT

When a constraint violation occurs, the command backs out any prior changes it might have made and aborts with a return code of SQLITE_CONSTRAINT. But no ROLLBACK is executed so changes from prior commands within the same transaction are preserved. This is the default behavior.

FAIL

When a constraint violation occurs, the command aborts with a return code SQLITE_CONSTRAINT. But any changes to the database that the command made prior to encountering the constraint violation are preserved and are not backed out. For example, if an UPDATE statement encountered a constraint violation on the 100th row that it attempts to update, then the first 99 row changes are preserved but changes to rows 100 and beyond never occur.

IGNORE

When a constraint violation occurs, the one row that contains the constraint violation is not inserted or changed. But the command continues executing normally. Other rows before and after the row that contained the constraint violation continue to be inserted or updated normally. No error is returned.

REPLACE

When a UNIQUE constraint violation occurs, the pre-existing rows that are causing the constraint violation are removed prior to inserting or updating the current row. Thus the insert or update always occurs. The command continues executing normally. No error is returned. If a NOT NULL constraint violation occurs, the NULL value is replaced by the default value for that column. If the column has no default value, then the ABORT algorithm is used. If a CHECK constraint violation occurs then the IGNORE algorithm is used.

When this conflict resolution strategy deletes rows in order to satisfy a constraint, it does not invoke delete triggers on those rows. This behavior might change in a future release.

The algorithm specified in the OR clause of a INSERT or UPDATE overrides any algorithm specified in a CREATE TABLE. If no algorithm is specified anywhere, the ABORT algorithm is used.


PRAGMA
SQLite Language Reference Documentation

SQL As Understood By SQLite

PRAGMA

The PRAGMA command is a special command used to modify the operation of the SQLite library or to query the library for internal (non-table) data. The PRAGMA command is issued using the same interface as other SQLite commands (e.g. SELECT, INSERT) but is different in the following important respects:

  • Specific pragma statements may be removed and others added in future releases of SQLite. Use with caution!
  • No error messages are generated if an unknown pragma is issued. Unknown pragmas are simply ignored. This means if there is a typo in a pragma statement the library does not inform the user of the fact.
  • Some pragmas take effect during the SQL compilation stage, not the execution stage. This means if using the C-language sqlite3_compile(), sqlite3_step(), sqlite3_finalize() API (or similar in a wrapper interface), the pragma may be applied to the library during the sqlite3_compile() call.
  • The pragma command is unlikely to be compatible with any other SQL engine.

The available pragmas fall into four basic categories:

  • Pragmas used to query the schema of the current database.
  • Pragmas used to modify the operation of the SQLite library in some manner, or to query for the current mode of operation.
  • Pragmas used to query or modify the databases two version values, the schema-version and the user-version.
  • Pragmas used to debug the library and verify that database files are not corrupted.

PRAGMA command syntax

sql-statement ::= PRAGMA name [= value] |
PRAGMA function(arg)

The pragmas that take an integer value also accept symbolic names. The strings "on", "true", and "yes" are equivalent to 1. The strings "off", "false", and "no" are equivalent to 0. These strings are case- insensitive, and do not require quotes. An unrecognized string will be treated as 1, and will not generate an error. When the value is returned it is as an integer.

Pragmas to modify library operation

  • PRAGMA auto_vacuum;
    PRAGMA auto_vacuum =     0 | 1;

    Query or set the auto-vacuum flag in the database.

    Normally, when a transaction that deletes data from a database is committed, the database file remains the same size. Unused database file pages are marked as such and reused later on, when data is inserted into the database. In this mode the VACUUM command is used to reclaim unused space.

    When the auto-vacuum flag is set, the database file shrinks when a transaction that deletes data is committed (The VACUUM command is not useful in a database with the auto-vacuum flag set). To support this functionality the database stores extra information internally, resulting in slightly larger database files than would otherwise be possible.

    It is only possible to modify the value of the auto-vacuum flag before any tables have been created in the database. No error message is returned if an attempt to modify the auto-vacuum flag is made after one or more tables have been created.

  • PRAGMA cache_size;
    PRAGMA cache_size =     Number-of-pages;

    Query or change the maximum number of database disk pages that SQLite will hold in memory at once. Each page uses about 1.5K of memory. The default cache size is 2000. If you are doing UPDATEs or DELETEs that change many rows of a database and you do not mind if SQLite uses more memory, you can increase the cache size for a possible speed improvement.

    When you change the cache size using the cache_size pragma, the change only endures for the current session. The cache size reverts to the default value when the database is closed and reopened. Use the default_cache_size pragma to check the cache size permanently.

  • PRAGMA case_sensitive_like;
    PRAGMA case_sensitive_like =     0 | 1;

    The default behavior of the LIKE operator is to ignore case for latin1 characters. Hence, by default 'a' LIKE 'A' is true. The case_sensitive_like pragma can be turned on to change this behavior. When case_sensitive_like is enabled, 'a' LIKE 'A' is false but 'a' LIKE 'a' is still true.

  • PRAGMA count_changes;
    PRAGMA count_changes =     0 | 1;

    Query or change the count-changes flag. Normally, when the count-changes flag is not set, INSERT, UPDATE and DELETE statements return no data. When count-changes is set, each of these commands returns a single row of data consisting of one integer value - the number of rows inserted, modified or deleted by the command. The returned change count does not include any insertions, modifications or deletions performed by triggers.

  • PRAGMA default_cache_size;
    PRAGMA default_cache_size =     Number-of-pages;

    Query or change the maximum number of database disk pages that SQLite will hold in memory at once. Each page uses 1K on disk and about 1.5K in memory. This pragma works like the cache_size pragma with the additional feature that it changes the cache size persistently. With this pragma, you can set the cache size once and that setting is retained and reused every time you reopen the database.

  • PRAGMA default_synchronous;

    This pragma was available in version 2.8 but was removed in version 3.0. It is a dangerous pragma whose use is discouraged. To help dissuide users of version 2.8 from employing this pragma, the documentation will not tell you what it does.

  • PRAGMA empty_result_callbacks;
    PRAGMA empty_result_callbacks =     0 | 1;

    Query or change the empty-result-callbacks flag.

    The empty-result-callbacks flag affects the sqlite3_exec API only. Normally, when the empty-result-callbacks flag is cleared, the callback function supplied to the sqlite3_exec() call is not invoked for commands that return zero rows of data. When empty-result-callbacks is set in this situation, the callback function is invoked exactly once, with the third parameter set to 0 (NULL). This is to enable programs that use the sqlite3_exec() API to retrieve column-names even when a query returns no data.

  • PRAGMA encoding;
    PRAGMA encoding = "UTF-8";
    PRAGMA encoding = "UTF-16";
    PRAGMA encoding = "UTF-16le";
    PRAGMA encoding = "UTF-16be";

    In first form, if the main database has already been created, then this pragma returns the text encoding used by the main database, one of "UTF-8", "UTF-16le" (little-endian UTF-16 encoding) or "UTF-16be" (big-endian UTF-16 encoding). If the main database has not already been created, then the value returned is the text encoding that will be used to create the main database, if it is created by this session.

    The second and subsequent forms of this pragma are only useful if the main database has not already been created. In this case the pragma sets the encoding that the main database will be created with if it is created by this session. The string "UTF-16" is interpreted as "UTF-16 encoding using native machine byte-ordering". If the second and subsequent forms are used after the database file has already been created, they have no effect and are silently ignored.

    Once an encoding has been set for a database, it cannot be changed.

    Databases created by the ATTACH command always use the same encoding as the main database.

  • PRAGMA full_column_names;
    PRAGMA full_column_names =     0 | 1;

    Query or change the full-column-names flag. This flag affects the way SQLite names columns of data returned by SELECT statements when the expression for the column is a table-column name or the wildcard "*". Normally, such result columns are named <table-name/alias><column-name> if the SELECT statement joins two or more tables together, or simply <column-name> if the SELECT statement queries a single table. When the full-column-names flag is set, such columns are always named <table-name/alias> <column-name> regardless of whether or not a join is performed.

    If both the short-column-names and full-column-names are set, then the behaviour associated with the full-column-names flag is exhibited.

  • PRAGMA fullfsync
    PRAGMA fullfsync =     0 | 1;

    Query or change the fullfsync flag. This flag affects determines whether or not the F_FULLFSYNC syncing method is used on systems that support it. The default value is off. As of this writing (2006-02-10) only Mac OS X supports F_FULLFSYNC.

  • PRAGMA legacy_file_format;
    PRAGMA legacy_file_format = ON | OFF

    This pragma sets or queries the value of the legacy_file_format flag. When this flag is on, new SQLite databases are created in a file format that is readable and writable by all versions of SQLite going back to 3.0.0. When the flag is off, new databases are created using the latest file format which might to be readable or writable by older versions of SQLite.

    This flag only effects newly created databases. It has no effect on databases that already exists.

  • PRAGMA page_size;
    PRAGMA page_size =     bytes;

    Query or set the page-size of the database. The page-size may only be set if the database has not yet been created. The page size must be a power of two greater than or equal to 512 and less than or equal to 8192. The upper limit may be modified by setting the value of macro SQLITE_MAX_PAGE_SIZE during compilation. The maximum upper bound is 32768.

  • PRAGMA read_uncommitted;
    PRAGMA read_uncommitted =     0 | 1;

    Query, set, or clear READ UNCOMMITTED isolation. The default isolation level for SQLite is SERIALIZABLE. Any process or thread can select READ UNCOMMITTED isolation, but SERIALIZABLE will still be used except between connections that share a common page and schema cache. Cache sharing is enabled using the sqlite3_enable_shared_cache() API and is only available between connections running the same thread. Cache sharing is off by default.

  • PRAGMA short_column_names;
    PRAGMA short_column_names =     0 | 1;

    Query or change the short-column-names flag. This flag affects the way SQLite names columns of data returned by SELECT statements when the expression for the column is a table-column name or the wildcard "*". Normally, such result columns are named <table-name/alias>lt;column-name> if the SELECT statement joins two or more tables together, or simply <column-name> if the SELECT statement queries a single table. When the short-column-names flag is set, such columns are always named <column-name> regardless of whether or not a join is performed.

    If both the short-column-names and full-column-names are set, then the behaviour associated with the full-column-names flag is exhibited.

  • PRAGMA synchronous;
    PRAGMA synchronous = FULL;     (2)
    PRAGMA synchronous = NORMAL;     (1)
    PRAGMA synchronous = OFF;     (0)

    Query or change the setting of the "synchronous" flag. The first (query) form will return the setting as an integer. When synchronous is FULL (2), the SQLite database engine will pause at critical moments to make sure that data has actually been written to the disk surface before continuing. This ensures that if the operating system crashes or if there is a power failure, the database will be uncorrupted after rebooting. FULL synchronous is very safe, but it is also slow. When synchronous is NORMAL, the SQLite database engine will still pause at the most critical moments, but less often than in FULL mode. There is a very small (though non-zero) chance that a power failure at just the wrong time could corrupt the database in NORMAL mode. But in practice, you are more likely to suffer a catastrophic disk failure or some other unrecoverable hardware fault. With synchronous OFF (0), SQLite continues without pausing as soon as it has handed data off to the operating system. If the application running SQLite crashes, the data will be safe, but the database might become corrupted if the operating system crashes or the computer loses power before that data has been written to the disk surface. On the other hand, some operations are as much as 50 or more times faster with synchronous OFF.

    In SQLite version 2, the default value is NORMAL. For version 3, the default was changed to FULL.

  • PRAGMA temp_store;
    PRAGMA temp_store = DEFAULT;     (0)
    PRAGMA temp_store = FILE;     (1)
    PRAGMA temp_store = MEMORY;     (2)

    Query or change the setting of the "temp_store" parameter. When temp_store is DEFAULT (0), the compile-time C preprocessor macro TEMP_STORE is used to determine where temporary tables and indices are stored. When temp_store is MEMORY (2) temporary tables and indices are kept in memory. When temp_store is FILE (1) temporary tables and indices are stored in a file. The temp_store_directory pragma can be used to specify the directory containing this file. FILE is specified. When the temp_store setting is changed, all existing temporary tables, indices, triggers, and views are immediately deleted.

    It is possible for the library compile-time C preprocessor symbol TEMP_STORE to override this pragma setting. The following table summarizes the interaction of the TEMP_STORE preprocessor macro and the temp_store pragma:

    TEMP_STORE PRAGMA
    temp_store     		Storage used for
    TEMP tables and indices
    0 | any | file
    1 | 0 | file
    1 | 1 | file
    1 | 2 | memory
    2 | 0 | memory
    2 | 1 | file
    2 | 2 | memory
    3 | any | memory

  • PRAGMA temp_store_directory;
    PRAGMA temp_store_directory = 'directory-name';

    Query or change the setting of the "temp_store_directory" - the directory where files used for storing temporary tables and indices are kept. This setting lasts for the duration of the current connection only and resets to its default value for each new connection opened.

    When the temp_store_directory setting is changed, all existing temporary tables, indices, triggers, and viewers are immediately deleted. In practice, temp_store_directory should be set immediately after the database is opened.

    The value directory-name should be enclosed in single quotes. To revert the directory to the default, set the directory-name to an empty string, e.g., PRAGMA temp_store_directory = ''. An error is raised if directory-name is not found or is not writable.

    The default directory for temporary files depends on the OS. For Unix/Linux/OSX, the default is the is the first writable directory found in the list of: /var/tmp, /usr/tmp, /tmp, and current-directory. For Windows NT, the default directory is determined by Windows, generally C:\Documents and Settings\user-name\Local Settings\Temp\. Temporary files created by SQLite are unlinked immediately after opening, so that the operating system can automatically delete the files when the SQLite process exits. Thus, temporary files are not normally visible through ls or dir commands.

Pragmas to query the database schema

  • PRAGMA database_list;

    For each open database, invoke the callback function once with information about that database. Arguments include the index and the name the database was attached with. The first row will be for the main database. The second row will be for the database used to store temporary tables.

  • PRAGMA foreign_key_list(table-name);

    For each foreign key that references a column in the argument table, invoke the callback function with information about that foreign key. The callback function will be invoked once for each column in each foreign key.

  • PRAGMA index_info(index-name);

    For each column that the named index references, invoke the callback function once with information about that column, including the column name, and the column number.

  • PRAGMA index_list(table-name);

    For each index on the named table, invoke the callback function once with information about that index. Arguments include the index name and a flag to indicate whether or not the index must be unique.

  • PRAGMA table_info(table-name);

    For each column in the named table, invoke the callback function once with information about that column, including the column name, data type, whether or not the column can be NULL, and the default value for the column.

Pragmas to query/modify version values

  • PRAGMA [database.]schema_version;
    PRAGMA [database.]schema_version =     integer ;
    PRAGMA [database.]user_version;
    PRAGMA [database.]user_version =     integer ;

    The pragmas schema_version and user_version are used to set or get the value of the schema-version and user-version, respectively. Both the schema-version and the user-version are 32-bit signed integers stored in the database header.

    The schema-version is usually only manipulated internally by SQLite. It is incremented by SQLite whenever the database schema is modified (by creating or dropping a table or index). The schema version is used by SQLite each time a query is executed to ensure that the internal cache of the schema used when compiling the SQL query matches the schema of the database against which the compiled query is actually executed. Subverting this mechanism by using "PRAGMA schema_version" to modify the schema-version is potentially dangerous and may lead to program crashes or database corruption. Use with caution!

    The user-version is not used internally by SQLite. It may be used by applications for any purpose.

Pragmas to debug the library

  • PRAGMA integrity_check;

    The command does an integrity check of the entire database. It looks for out-of-order records, missing pages, malformed records, and corrupt indices. If any problems are found, then a single string is returned which is a description of all problems. If everything is in order, "ok" is returned.

  • PRAGMA parser_trace = ON; (1)
    PRAGMA parser_trace = OFF;     (0)

    Turn tracing of the SQL parser inside of the SQLite library on and off. This is used for debugging. This only works if the library is compiled without the NDEBUG macro.

  • PRAGMA vdbe_trace = ON; (1)
    PRAGMA vdbe_trace = OFF;     (0)

    Turn tracing of the virtual database engine inside of the SQLite library on and off. This is used for debugging. See the VDBE documentation for more information.

  • PRAGMA vdbe_listing = ON; (1)
    PRAGMA vdbe_listing = OFF;     (0)

    Turn listings of virtual machine programs on and off. With listing is on, the entire content of a program is printed just prior to beginning execution. This is like automatically executing an EXPLAIN prior to each statement. The statement executes normally after the listing is printed. This is used for debugging. See the VDBE documentation for more information.


REINDEX
SQLite Language Reference Documentation

SQL As Understood By SQLite

REINDEX

sql-statement ::= REINDEX collation name
sql-statement ::= REINDEX [database-name .] table/index-name

The REINDEX command is used to delete and recreate indices from scratch. This is useful when the definition of a collation sequence has changed.

In the first form, all indices in all attached databases that use the named collation sequence are recreated. In the second form, if [database-name.]table/index-name identifies a table, then all indices associated with the table are rebuilt. If an index is identified, then only this specific index is deleted and recreated.

If no database-name is specified and there exists both a table or index and a collation sequence of the specified name, then indices associated with the collation sequence only are reconstructed. This ambiguity may be dispelled by always specifying a database-name when reindexing a specific table or index.


REPLACE
SQLite Language Reference Documentation

SQL As Understood By SQLite

REPLACE

sql-statement ::= REPLACE INTO [database-name .] table-name [( column-list )] VALUES ( value-list ) |
REPLACE INTO [database-name .] table-name [( column-list )] select-statement

The REPLACE command is an alias for the "INSERT OR REPLACE" variant of the INSERT command. This alias is provided for compatibility with MySQL. See the INSERT command documentation for additional information.


SELECT
SQLite Language Reference Documentation

SQL As Understood By SQLite

SELECT

sql-statement ::= | SELECT [ALL | DISTINCT] result [FROM table-list] [WHERE expr] [GROUP BY expr-list] [HAVING expr] [compound-op select]* [ORDER BY sort-expr-list] [LIMIT integer [( OFFSET | , ) integer]]
result ::= | result-column [, result-column]*
result-column ::= | * | table-name . * | expr [ [AS] string ]
table-list ::= | table [join-op table join-args]*
table ::= | table-name [AS alias] | ( select ) [AS alias]
join-op ::= | , | [NATURAL] [LEFT | RIGHT | FULL] [OUTER | INNER | CROSS] JOIN
join-args ::= | [ON expr] [USING ( id-list )]
sort-expr-list ::= | expr [sort-order] [, expr [sort-order]]*
sort-order ::= | [ COLLATE collation-name ] [ ASC | DESC ]
compound_op ::= | UNION | UNION ALL | INTERSECT | EXCEPT

The SELECT statement is used to query the database. The result of a SELECT is zero or more rows of data where each row has a fixed number of columns. The number of columns in the result is specified by the expression list in between the SELECT and FROM keywords. Any arbitrary expression can be used as a result. If a result expression is * then all columns of all tables are substituted for that one expression. If the expression is the name of a table followed by .* then the result is all columns in that one table.

The DISTINCT keyword causes a subset of result rows to be returned, in which each result row is different. NULL values are not treated as distinct from each other. The default behavior is that all result rows be returned, which can be made explicit with the keyword ALL.

The query is executed against one or more tables specified after the FROM keyword. If multiple tables names are separated by commas, then the query is against the cross join of the various tables. The full SQL-92 join syntax can also be used to specify joins. A sub-query in parentheses may be substituted for any table name in the FROM clause. The entire FROM clause may be omitted, in which case the result is a single row consisting of the values of the expression list.

The WHERE clause can be used to limit the number of rows over which the query operates.

The GROUP BY clauses causes one or more rows of the result to be combined into a single row of output. This is especially useful when the result contains aggregate functions. The expressions in the GROUP BY clause do not have to be expressions that appear in the result. The HAVING clause is similar to WHERE except that HAVING applies after grouping has occurred. The HAVING expression may refer to values, even aggregate functions, that are not in the result.

The ORDER BY clause causes the output rows to be sorted. The argument to ORDER BY is a list of expressions that are used as the key for the sort. The expressions do not have to be part of the result for a simple SELECT, but in a compound SELECT each sort expression must exactly match one of the result columns. Each sort expression may be optionally followed by a COLLATE keyword and the name of a collating function used for ordering text and/or keywords ASC or DESC to specify the sort order.

The LIMIT clause places an upper bound on the number of rows returned in the result. A negative LIMIT indicates no upper bound. The optional OFFSET following LIMIT specifies how many rows to skip at the beginning of the result set. In a compound query, the LIMIT clause may only appear on the final SELECT statement. The limit is applied to the entire query not to the individual SELECT statement to which it is attached. Note that if the OFFSET keyword is used in the LIMIT clause, then the limit is the first number and the offset is the second number. If a comma is used instead of the OFFSET keyword, then the offset is the first number and the limit is the second number. This seeming contradition is intentional - it maximizes compatibility with legacy SQL database systems.

A compound SELECT is formed from two or more simple SELECTs connected by one of the operators UNION, UNION ALL, INTERSECT, or EXCEPT. In a compound SELECT, all the constituent SELECTs must specify the same number of result columns. There may be only a single ORDER BY clause at the end of the compound SELECT. The UNION and UNION ALL operators combine the results of the SELECTs to the right and left into a single big table. The difference is that in UNION all result rows are distinct where in UNION ALL there may be duplicates. The INTERSECT operator takes the intersection of the results of the left and right SELECTs. EXCEPT takes the result of left SELECT after removing the results of the right SELECT. When three or more SELECTs are connected into a compound, they group from left to right.


TYPES
SQLite Language Reference Documentation

SQL As Understood By SQLite (sortof)

TYPES

sql-statement ::= | TYPES [datatype name][,datatype name][,datatype name][,...] ; select-stmt
select-stmt ::= | see SELECT

Use the TYPES keyword before a SELECT statement to provide the SQLite ADO.NET provider a list of return datatypes to expect from the subsequent SELECT statement.

This is a language extension (aka hack) to SQLite specifically for the ADO.NET data provider. It is a pseudo-statement, meaning only the ADO.NET provider understands it.

Background

Due to SQLite's typeless nature, there are certain kinds of queries for which the ADO.NET provider cannot determine the proper return data type. Scalar and aggregate functions pose a particular problem because there is no requirement for a given scalar or aggregate function to return any particular datatype. As a matter of fact, scalar functions could theoretically return a different datatype for every row or column in a query and this is perfectly legal from SQLite's point of view.

Since ADO.NET is designed around a typed system and we're shoe-horning SQLite into it, this keyword helps the provider out in cases where the return type cannot be easily determined.

This command must be used in conjunction with a SELECT statement. It only works when both the TYPES keyword and its value(s) are passed along with a SELECT statement as a single semi-colon separated unit.

Examples

TYPES [bigint], [int], [smallint], [tinyint];
SELECT 1, 2, 3, 4;

The above query would return the columns as types System.Int64, System.Int32, System.Int16 and System.Byte respectively.

TYPES [bigint], [int], , [tinyint];
SELECT 1, 2, 3, 4;

In this sample, only columns 1, 2 and 4 would have explicit typing. Column 3's datatype would pass though the system and be discovered normally.

TYPES real;
SELECT SUM(Cost) FROM [Products];

The above query explicitly tells the provider that the SUM aggregate function returns a System.Double.

Usage Notes

  • You cannot use parameters in the TYPES statement.
  • The TYPES statement must be immediately followed by a SELECT statement.
  • It is legal to pass multiple TYPES and SELECT statements in a multi-statement command.
  • You may enclose datatypes in quotes "" or brackets [] or those `` thingies if you want.


UPDATE
SQLite Language Reference Documentation

SQL As Understood By SQLite

UPDATE

sql-statement ::= | UPDATE [ OR conflict-algorithm ] [database-name .] table-name SET assignment [, assignment]* [WHERE expr]
assignment ::= | column-name = expr

The UPDATE statement is used to change the value of columns in selected rows of a table. Each assignment in an UPDATE specifies a column name to the left of the equals sign and an arbitrary expression to the right. The expressions may use the values of other columns. All expressions are evaluated before any assignments are made. A WHERE clause can be used to restrict which rows are updated.

The optional conflict-clause allows the specification of an alternative constraint conflict resolution algorithm to use during this one command. See the section titled ON CONFLICT for additional information.


TYPES

VACUUM
SQLite Language Reference Documentation
See Also Example

SQL As Understood By SQLite

VACUUM

sql-statement ::= VACUUM [index-or-tablename]

The VACUUM command is an SQLite extension modeled after a similar command found in PostgreSQL. If VACUUM is invoked with the name of a table or index then it is suppose to clean up the named table or index. In version 1.0 of SQLite, the VACUUM command would invoke gdbm_reorganize() to clean up the backend database file.

VACUUM became a no-op when the GDBM backend was removed from SQLITE in version 2.0.0. VACUUM was reimplemented in version 2.8.1. The index or table name argument is now ignored.

When an object (table, index, or trigger) is dropped from the database, it leaves behind empty space. This makes the database file larger than it needs to be, but can speed up inserts. In time inserts and deletes can leave the database file structure fragmented, which slows down disk access to the database contents. The VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy. This eliminates free pages, aligns table data to be contiguous, and otherwise cleans up the database file structure. It is not possible to perform the same process on an attached database file.

This command will fail if there is an active transaction. This command has no effect on an in-memory database.

As of SQLite version 3.1, an alternative to using the VACUUM command is auto-vacuum mode, enabled using the auto_vacuum pragma.


System.Data.SQLite

System.Data.SQLite Namespace
See Also Example Hierarchy

Classes

 | Class | Description
Public class | CommitEventArgs | Event arguments raised when a transaction is being committed
Public class | SQLiteCommand | SQLite implementation of DbCommand. This class cannot be inherited.
Public class | SQLiteCommandBuilder | SQLite implementation of DbCommandBuilder. This class cannot be inherited.
Public class | SQLiteConnection | SQLite implentation of DbConnection. This class cannot be inherited.
Public class | SQLiteConnectionStringBuilder | SQLite implementation of DbConnectionStringBuilder. This class cannot be inherited.
Public class | SQLiteConvert | This base class provides datatype conversion services for the SQLite provider. This class is abstract (MustInherit in Visual Basic)abstractMustInherit and so cannot be instantiated.
Public class | SQLiteDataAdapter | SQLite implementation of DbDataAdapter. This class cannot be inherited.
Public class | SQLiteDataReader | SQLite implementation of DbDataReader. This class cannot be inherited.
Public class | SQLiteException | SQLite exception class. This class cannot be inherited.
Public class | SQLiteFactory | SQLite implementation of DbProviderFactory. This class cannot be inherited.
Public class | SQLiteFunction | This abstract class is designed to handle user-defined functions easily. An instance of the derived class is made for each connection to the database. This class is abstract (MustInherit in Visual Basic)abstractMustInherit and so cannot be instantiated.
Public class | SQLiteFunctionAttribute | A simple custom attribute to enable us to easily find user-defined functions in the loaded assemblies and initialize them in SQLite as connections are made. This class cannot be inherited.
Public class | SQLiteMetaDataCollectionNames | MetaDataCollections specific to SQLite This is a static class (Module in Visual Basic)static classModule and so cannot be inherited or instantiated.
Public class | SQLiteParameter | SQLite implementation of DbParameter. This class cannot be inherited.
Public class | SQLiteParameterCollection | SQLite implementation of DbParameterCollection. This class cannot be inherited.
Public class | SQLiteTransaction | SQLite implementation of DbTransaction. This class cannot be inherited.
Public class | UpdateEventArgs | Passed during an Update callback, these event arguments detail the type of update operation being performed on the given connection.

Delegates

 | Delegate | Description
Public delegate | SQLiteCommitHandler | Raised when a transaction is about to be committed. To roll back a transaction, set the rollbackTrans boolean value to true.
Public delegate | SQLiteUpdateEventHandler | Raised when data is inserted, updated and deleted on a given connection

Enumerations

 | Enumeration | Description
Public enumeration | FunctionType | The type of user-defined function to declare
Public enumeration | SQLiteDateFormats | This implementation of SQLite for ADO.NET can process date/time fields in databases in only one of two formats. Ticks and ISO8601. Ticks is inherently more accurate, but less compatible with 3rd party tools that query the database, and renders the DateTime field unreadable without post-processing. ISO8601 is more compatible, readable, fully-processable, but less accurate as it doesn't provide time down to fractions of a second.
Public enumeration | SQLiteErrorCode | SQLite error codes
Public enumeration | SynchronizationModes | The I/O file cache flushing behavior for the connection
Public enumeration | TypeAffinity | SQLite has very limited types, and is inherently text-based. The first 5 types below represent the sum of all types SQLite understands. The DateTime extension to the spec is for internal use only.
Public enumeration | UpdateEventType | Whenever an update event is triggered on a connection, this enum will indicate exactly what type of operation is being performed.

Syntax based on .NET Framework version 2.0.
Documentation version 1.0.0.0.


CommitEventArgs Class

CommitEventArgs Class
See Also Example Members
[image]

Event arguments raised when a transaction is being committed

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Class CommitEventArgs
Inherits EventArgs
C#
public class CommitEventArgs : EventArgs
C++
ref class CommitEventArgs : EventArgs
J#
public class CommitEventArgs extends EventArgs
JScript
public class CommitEventArgs extends EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
System.Data.SQLite.CommitEventArgs

See Also

CommitEventArgs Members
System.Data.SQLite Namespace

Syntax based on .NET Framework version 2.0.
Documentation version 1.0.0.0.

Send comments on this topic.

Generated from assembly System.Data.SQLite [1.0.49.0]


CommitEventArgs Members

CommitEventArgs Members
See Also Example Fields Methods
[image]

Event arguments raised when a transaction is being committed

The following tables list the members exposed by CommitEventArgs.

Public Fields

 | Name | Description
Public field | AbortTransaction | Set to true to abort the transaction and trigger a rollback
Top

Public Methods

 | Name | Description
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

Protected Methods

 | Name | Description
Family method | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method | MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object)
Top

See Also

CommitEventArgs Class
System.Data.SQLite Namespace


Fields

CommitEventArgs Fields
[image]

Public Fields

 | Name | Description
Public field | AbortTransaction | Set to true to abort the transaction and trigger a rollback
Top

See Also

CommitEventArgs Class


AbortTransaction Field

CommitEventArgs.AbortTransaction Field
[image]

Set to true to abort the transaction and trigger a rollback

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public AbortTransaction As Boolean
C#
public bool AbortTransaction;
C++
public:
bool AbortTransaction sealed ;
J#
public bool AbortTransaction
JScript
public AbortTransaction : bool;

See Also

CommitEventArgs Class


FunctionType Enumeration

FunctionType Enumeration
[image]

The type of user-defined function to declare

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Enum FunctionType
C#
public enum FunctionType
C++
public enum class FunctionType
J#
public enum FunctionType
JScript
public enum FunctionType

Members

Member Name | Description
Scalar | Scalar functions are designed to be called and return a result immediately. Examples include ABS(), Upper(), Lower(), etc.
Aggregate | Aggregate functions are designed to accumulate data until the end of a call and then return a result gleaned from the accumulated data. Examples include SUM(), COUNT(), AVG(), etc.
Collation | Collation sequences are used to sort textual data in a custom manner, and appear in an ORDER BY clause. Typically text in an ORDER BY is sorted using a straight case-insensitive comparison function. Custom collating sequences can be used to alter the behavior of text sorting in a user-defined manner.

See Also


SQLiteCommand Class

SQLiteCommand Class
See Also Example Members
[image]

SQLite implementation of DbCommand. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteCommand
Inherits DbCommand
Implements ICloneable
C#
public sealed class SQLiteCommand : DbCommand, ICloneable
C++
ref class SQLiteCommand sealed : DbCommand, ICloneable
J#
public final class SQLiteCommand extends DbCommand implements ICloneable
JScript
public final class SQLiteCommand extends DbCommand, ICloneable

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbCommand
System.Data.SQLite.SQLiteCommand

See Also

SQLiteCommand Members


SQLiteCommand Members

SQLiteCommand Members
See Also Example Properties Methods Events Explicit Inteface Implementations
[image]

SQLite implementation of DbCommand. This class cannot be inherited.

The following tables list the members exposed by SQLiteCommand.

Public Constructors

Name | Description
SQLiteCommand | Overloaded. Constructs a new SQLiteCommand
Top

Public Properties

 | Name | Description
Public property | CommandText | Overridden. The SQL command text associated with the command
Public property | CommandTimeout | Overridden. The amount of time to wait for the connection to become available before erroring out
Public property | CommandType | Overridden. The type of the command. SQLite only supports CommandType.Text
Public property | Connection | The connection associated with this command
Public property | Container | Gets the IContainer that contains the Component. (inherited from Component)
Public property | DesignTimeVisible | Overridden. Determines if the command is visible at design time. Defaults to True.
Public property | Parameters | Returns the SQLiteParameterCollection for the given command
Public property | Site | Gets or sets the ISite of the Component. (inherited from Component)
Public property | Transaction | The transaction associated with this command. SQLite only supports one transaction per connection, so this property forwards to the command's underlying connection.
Public property | UpdatedRowSource | Overridden. Sets the method the SQLiteCommandBuilder uses to determine how to update inserted or updated rows in a DataTable.
Top

Public Methods

 | Name | Description
Public method | Cancel | Overridden. Not implemented
Public method | Clone | Clones a command, including all its parameters
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | CreateParameter | Create a new parameter
Public method | Dispose | Releases all resources used by the Component. (inherited from Component)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | ExecuteNonQuery | Overridden. Execute the command and return the number of rows inserted/updated affected by it.
Public method | ExecuteReader | Overloaded. Overrides the default behavior of DbDataReader to return a specialized SQLiteDataReader class
Public method | ExecuteScalar | Overridden. Execute the command and return the first column of the first row of the resultset (if present), or null if no resultset was returned.
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | Prepare | Overridden. Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards.
Public method | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component)
Top

Public Events

 | Name | Description
Public event | Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component)
Top

Explicit Interface Implementations

Name | Description
SQLiteCommand | Overloaded. Constructs a new SQLiteCommand
Top

See Also

SQLiteCommand Class


SQLiteCommand Constructor

SQLiteCommand Constructor

Constructs a new SQLiteCommand

Overload List

 | Name | Description
Public method | SQLiteCommand | Default constructor
Public method | SQLiteCommand (SQLiteConnection) | Initializes the command and associates it with the specified connection.
Public method | SQLiteCommand (String) | Initializes the command with the given command text
Public method | SQLiteCommand (String, SQLiteConnection) | Initializes the command with the given SQL command text and attach the command to the specified connection.
Public method | SQLiteCommand (String, SQLiteConnection, SQLiteTransaction) | Initializes a command with the given SQL, connection and transaction

See Also

SQLiteCommand Class


SQLiteCommand Constructor ()

SQLiteCommand Constructor ()
See Also Example
[image]

Default constructor

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteCommand()
C++
public:
SQLiteCommand() sealed
J#
public SQLiteCommand()
JScript
public function SQLiteCommand()

See Also

SQLiteCommand Class
SQLiteCommand Constructor Overload List


SQLiteCommand Constructor (SQLiteConnection)

SQLiteCommand Constructor (SQLiteConnection)
See Also Example
[image]

Initializes the command and associates it with the specified connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal connection As SQLiteConnection _
)
C#
public SQLiteCommand(
SQLiteConnection connection
)
C++
public:
SQLiteCommand(
SQLiteConnection connection
) sealed
J#
public SQLiteCommand(
SQLiteConnection connection
)
JScript
public function SQLiteCommand(
connection : SQLiteConnection
)

Parameters

connection
The connection to associate with the command

See Also

SQLiteCommand Class
SQLiteCommand Constructor Overload List


SQLiteCommand Constructor (String)

SQLiteCommand Constructor (String)
See Also Example
[image]

Initializes the command with the given command text

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal commandText As String _
)
C#
public SQLiteCommand(
string commandText
)
C++
public:
SQLiteCommand(
String commandText
) sealed
J#
public SQLiteCommand(
string commandText
)
JScript
public function SQLiteCommand(
commandText : String
)

Parameters

commandText
The SQL command text

See Also

SQLiteCommand Class
SQLiteCommand Constructor Overload List


SQLiteCommand Constructor (String, SQLiteConnection)

SQLiteCommand Constructor (String, SQLiteConnection)
See Also Example
[image]

Initializes the command with the given SQL command text and attach the command to the specified connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal commandText As String, _
ByVal connection As SQLiteConnection _
)
C#
public SQLiteCommand(
string commandText,
SQLiteConnection connection
)
C++
public:
SQLiteCommand(
String commandText,
SQLiteConnection connection
) sealed
J#
public SQLiteCommand(
string commandText,
SQLiteConnection connection
)
JScript
public function SQLiteCommand(
commandText : String,
connection : SQLiteConnection
)

Parameters

commandText
The SQL command text
connection
The connection to associate with the command

See Also

SQLiteCommand Class
SQLiteCommand Constructor Overload List


SQLiteCommand Constructor (String, SQLiteConnection, SQLiteTransaction)

SQLiteCommand Constructor (String, SQLiteConnection, SQLiteTransaction)
See Also Example
[image]

Initializes a command with the given SQL, connection and transaction

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal commandText As String, _
ByVal connection As SQLiteConnection, _
ByVal transaction As SQLiteTransaction _
)
C#
public SQLiteCommand(
string commandText,
SQLiteConnection connection,
SQLiteTransaction transaction
)
C++
public:
SQLiteCommand(
String commandText,
SQLiteConnection connection,
SQLiteTransaction transaction
) sealed
J#
public SQLiteCommand(
string commandText,
SQLiteConnection connection,
SQLiteTransaction transaction
)
JScript
public function SQLiteCommand(
commandText : String,
connection : SQLiteConnection,
transaction : SQLiteTransaction
)

Parameters

commandText
The SQL command text
connection
The connection to associate with the command
transaction
The transaction the command should be associated with

See Also

SQLiteCommand Class
SQLiteCommand Constructor Overload List


Properties

SQLiteCommand Properties
[image]

Public Properties

 | Name | Description
Public property | CommandText | Overridden. The SQL command text associated with the command
Public property | CommandTimeout | Overridden. The amount of time to wait for the connection to become available before erroring out
Public property | CommandType | Overridden. The type of the command. SQLite only supports CommandType.Text
Public property | Connection | The connection associated with this command
Public property | Container | Gets the IContainer that contains the Component. (inherited from Component)
Public property | DesignTimeVisible | Overridden. Determines if the command is visible at design time. Defaults to True.
Public property | Parameters | Returns the SQLiteParameterCollection for the given command
Public property | Site | Gets or sets the ISite of the Component. (inherited from Component)
Public property | Transaction | The transaction associated with this command. SQLite only supports one transaction per connection, so this property forwards to the command's underlying connection.
Public property | UpdatedRowSource | Overridden. Sets the method the SQLiteCommandBuilder uses to determine how to update inserted or updated rows in a DataTable.
Top

See Also

SQLiteCommand Class


CommandText Property

SQLiteCommand.CommandText Property
[image]

The SQL command text associated with the command

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property CommandText As String _
Implements IDbCommand.CommandText
C#
public override string CommandText { get; set; }
C++
public override property string CommandText override {
String get();
void set(String value);
}
J#
/** property */
public string get_CommandText();

/** property */
public void set_CommandText(string value);
JScript
public function get CommandText() : String

public function set CommandText(value : String);

Implements

IDbCommand.CommandText

See Also

SQLiteCommand Class


CommandTimeout Property

SQLiteCommand.CommandTimeout Property
[image]

The amount of time to wait for the connection to become available before erroring out

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property CommandTimeout As Integer _
Implements IDbCommand.CommandTimeout
C#
public override int CommandTimeout { get; set; }
C++
public override property int CommandTimeout override {
int get();
void set(int value);
}
J#
/** property */
public int get_CommandTimeout();

/** property */
public void set_CommandTimeout(int value);
JScript
public function get CommandTimeout() : int

public function set CommandTimeout(value : int);

Implements

IDbCommand.CommandTimeout

See Also

SQLiteCommand Class


CommandType Property

SQLiteCommand.CommandType Property
[image]

The type of the command. SQLite only supports CommandType.Text

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property CommandType As CommandType _
Implements IDbCommand.CommandType
C#
public override CommandType CommandType { get; set; }
C++
public override property CommandType CommandType override {
CommandType get();
void set(CommandType value);
}
J#
/** property */
public CommandType get_CommandType();

/** property */
public void set_CommandType(CommandType value);
JScript
public function get CommandType() : CommandType

public function set CommandType(value : CommandType);

Implements

IDbCommand.CommandType

See Also

SQLiteCommand Class


Connection Property

SQLiteCommand.Connection Property
[image]

The connection associated with this command

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Property Connection As SQLiteConnection
C#
public new SQLiteConnection Connection { get; set; }
C++
public new property SQLiteConnection Connection sealed {
SQLiteConnection get();
void set(SQLiteConnection value);
}
J#
/** property */
public SQLiteConnection get_Connection();

/** property */
public void set_Connection(SQLiteConnection value);
JScript
public function get Connection() : SQLiteConnection

public function set Connection(value : SQLiteConnection);

See Also

SQLiteCommand Class


DesignTimeVisible Property

SQLiteCommand.DesignTimeVisible Property
[image]

Determines if the command is visible at design time. Defaults to True.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property DesignTimeVisible As Boolean
C#
public override bool DesignTimeVisible { get; set; }
C++
public override property bool DesignTimeVisible override {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_DesignTimeVisible();

/** property */
public void set_DesignTimeVisible(bool value);
JScript
public function get DesignTimeVisible() : bool

public function set DesignTimeVisible(value : bool);

See Also

SQLiteCommand Class


Parameters Property

SQLiteCommand.Parameters Property
[image]

Returns the SQLiteParameterCollection for the given command

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows ReadOnly Property Parameters As SQLiteParameterCollection
C#
public new SQLiteParameterCollection Parameters { get; }
C++
public new property SQLiteParameterCollection Parameters sealed {
SQLiteParameterCollection get();
}
J#
/** property */
public SQLiteParameterCollection get_Parameters();
JScript
public function get Parameters() : SQLiteParameterCollection

See Also

SQLiteCommand Class


Transaction Property

SQLiteCommand.Transaction Property
[image]

The transaction associated with this command. SQLite only supports one transaction per connection, so this property forwards to the command's underlying connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Property Transaction As SQLiteTransaction
C#
public new SQLiteTransaction Transaction { get; set; }
C++
public new property SQLiteTransaction Transaction sealed {
SQLiteTransaction get();
void set(SQLiteTransaction value);
}
J#
/** property */
public SQLiteTransaction get_Transaction();

/** property */
public void set_Transaction(SQLiteTransaction value);
JScript
public function get Transaction() : SQLiteTransaction

public function set Transaction(value : SQLiteTransaction);

See Also

SQLiteCommand Class


UpdatedRowSource Property

SQLiteCommand.UpdatedRowSource Property
[image]

Sets the method the SQLiteCommandBuilder uses to determine how to update inserted or updated rows in a DataTable.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property UpdatedRowSource As UpdateRowSource _
Implements IDbCommand.UpdatedRowSource
C#
public override UpdateRowSource UpdatedRowSource { get; set; }
C++
public override property UpdateRowSource UpdatedRowSource override {
UpdateRowSource get();
void set(UpdateRowSource value);
}
J#
/** property */
public UpdateRowSource get_UpdatedRowSource();

/** property */
public void set_UpdatedRowSource(UpdateRowSource value);
JScript
public function get UpdatedRowSource() : UpdateRowSource

public function set UpdatedRowSource(value : UpdateRowSource);

Implements

IDbCommand.UpdatedRowSource

See Also

SQLiteCommand Class


Methods

SQLiteCommand Methods
[image]

Public Methods

 | Name | Description
Public method | Cancel | Overridden. Not implemented
Public method | Clone | Clones a command, including all its parameters
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | CreateParameter | Create a new parameter
Public method | Dispose | Releases all resources used by the Component. (inherited from Component)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | ExecuteNonQuery | Overridden. Execute the command and return the number of rows inserted/updated affected by it.
Public method | ExecuteReader | Overloaded. Overrides the default behavior of DbDataReader to return a specialized SQLiteDataReader class
Public method | ExecuteScalar | Overridden. Execute the command and return the first column of the first row of the resultset (if present), or null if no resultset was returned.
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | Prepare | Overridden. Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards.
Public method | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component)
Top

See Also

SQLiteCommand Class


Cancel Method

SQLiteCommand.Cancel Method
[image]

Not implemented

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Cancel() _
Implements IDbCommand.Cancel
C#
public override void Cancel()
C++
public:
virtual void Cancel() override
J#
public override void Cancel()
JScript
public override function Cancel()

Implements

IDbCommand.Cancel

See Also

SQLiteCommand Class


Clone Method

SQLiteCommand.Clone Method
[image]

Clones a command, including all its parameters

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function Clone() As Object _
Implements ICloneable.Clone
C#
public object Clone()
C++
public:
Object Clone() sealed
J#
public object Clone()
JScript
public function Clone() : Object

Return Value

A new SQLiteCommand with the same commandtext, connection and parameters

Implements

ICloneable.Clone

See Also

SQLiteCommand Class


CreateParameter Method

SQLiteCommand.CreateParameter Method
[image]

Create a new parameter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function CreateParameter() As SQLiteParameter
C#
public new SQLiteParameter CreateParameter()
C++
public:
SQLiteParameter CreateParameter() sealed
J#
public new SQLiteParameter CreateParameter()
JScript
public function CreateParameter() : SQLiteParameter

See Also

SQLiteCommand Class


ExecuteNonQuery Method

SQLiteCommand.ExecuteNonQuery Method
[image]

Execute the command and return the number of rows inserted/updated affected by it.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function ExecuteNonQuery() As Integer _
Implements IDbCommand.ExecuteNonQuery
C#
public override int ExecuteNonQuery()
C++
public:
virtual int ExecuteNonQuery() override
J#
public override int ExecuteNonQuery()
JScript
public override function ExecuteNonQuery() : int

Implements

IDbCommand.ExecuteNonQuery

See Also

SQLiteCommand Class


ExecuteReader Method

SQLiteCommand.ExecuteReader Method

Overrides the default behavior of DbDataReader to return a specialized SQLiteDataReader class

Overload List

 | Name | Description
Public method | ExecuteReader | Overrides the default behavior of DbDataReader to return a specialized SQLiteDataReader class
Public method | ExecuteReader (CommandBehavior) | Overrides the default behavior to return a SQLiteDataReader specialization class

See Also

SQLiteCommand Class


ExecuteReader Method ()

SQLiteCommand.ExecuteReader Method ()
See Also Example
[image]

Overrides the default behavior of DbDataReader to return a specialized SQLiteDataReader class

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function ExecuteReader() As SQLiteDataReader
C#
public new SQLiteDataReader ExecuteReader()
C++
public:
SQLiteDataReader ExecuteReader() sealed
J#
public new SQLiteDataReader ExecuteReader()
JScript
public function ExecuteReader() : SQLiteDataReader

Return Value

A SQLiteDataReader

See Also

SQLiteCommand Class
SQLiteCommand.ExecuteReader Overload List


ExecuteReader Method (CommandBehavior)

SQLiteCommand.ExecuteReader Method (CommandBehavior)
See Also Example
[image]

Overrides the default behavior to return a SQLiteDataReader specialization class

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function ExecuteReader( _
ByVal behavior As CommandBehavior _
) As SQLiteDataReader
C#
public new SQLiteDataReader ExecuteReader(
CommandBehavior behavior
)
C++
public:
SQLiteDataReader ExecuteReader(
CommandBehavior behavior
) sealed
J#
public new SQLiteDataReader ExecuteReader(
CommandBehavior behavior
)
JScript
public function ExecuteReader(
behavior : CommandBehavior
) : SQLiteDataReader

Parameters

behavior
The flags to be associated with the reader

Return Value

A SQLiteDataReader

See Also

SQLiteCommand Class
SQLiteCommand.ExecuteReader Overload List


ExecuteScalar Method

SQLiteCommand.ExecuteScalar Method
[image]

Execute the command and return the first column of the first row of the resultset (if present), or null if no resultset was returned.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function ExecuteScalar() As Object _
Implements IDbCommand.ExecuteScalar
C#
public override object ExecuteScalar()
C++
public:
virtual Object ExecuteScalar() override
J#
public override object ExecuteScalar()
JScript
public override function ExecuteScalar() : Object

Return Value

The first column of the first row of the first resultset from the query

Implements

IDbCommand.ExecuteScalar

See Also

SQLiteCommand Class


Prepare Method

SQLiteCommand.Prepare Method
[image]

Does nothing. Commands are prepared as they are executed the first time, and kept in prepared state afterwards.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Prepare() _
Implements IDbCommand.Prepare
C#
public override void Prepare()
C++
public:
virtual void Prepare() override
J#
public override void Prepare()
JScript
public override function Prepare()

Implements

IDbCommand.Prepare

See Also

SQLiteCommand Class


SQLiteCommandBuilder Class

SQLiteCommandBuilder Class
See Also Example Members
[image]

SQLite implementation of DbCommandBuilder. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteCommandBuilder
Inherits DbCommandBuilder
C#
public sealed class SQLiteCommandBuilder : DbCommandBuilder
C++
ref class SQLiteCommandBuilder sealed : DbCommandBuilder
J#
public final class SQLiteCommandBuilder extends DbCommandBuilder
JScript
public final class SQLiteCommandBuilder extends DbCommandBuilder

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbCommandBuilder
System.Data.SQLite.SQLiteCommandBuilder

See Also

SQLiteCommandBuilder Members


SQLiteCommandBuilder Members

SQLiteCommandBuilder Members
See Also Example Properties Methods Events Explicit Inteface Implementations
[image]

SQLite implementation of DbCommandBuilder. This class cannot be inherited.

The following tables list the members exposed by SQLiteCommandBuilder.

Public Constructors

Name | Description
SQLiteCommandBuilder | Overloaded. Initializes a new instance of the SQLiteCommandBuilder class.
Top

Public Properties

 | Name | Description
Public property | CatalogLocation | Overridden. Overridden to hide its property from the designer
Public property | CatalogSeparator | Overridden. Overridden to hide its property from the designer
Public property | ConflictOption | Specifies which ConflictOption is to be used by the DbCommandBuilder. (inherited from DbCommandBuilder)
Public property | Container | Gets the IContainer that contains the Component. (inherited from Component)
Public property | DataAdapter | Gets/sets the DataAdapter for this CommandBuilder
Public property | QuotePrefix | Overridden. Overridden to hide its property from the designer
Public property | QuoteSuffix | Overridden. Overridden to hide its property from the designer
Public property | SchemaSeparator | Overridden. Overridden to hide its property from the designer
Public property | SetAllValues | Specifies whether all column values in an update statement are included or only changed ones. (inherited from DbCommandBuilder)
Public property | Site | Gets or sets the ISite of the Component. (inherited from Component)
Top

Public Methods

 | Name | Description
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Dispose | Releases all resources used by the Component. (inherited from Component)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetDeleteCommand | Overloaded. Gets the automatically generated DbCommand object required to perform deletions at the data source.
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetInsertCommand | Overloaded. Gets the automatically generated DbCommand object required to perform insertions at the data source.
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | GetUpdateCommand | Overloaded. Gets the automatically generated DbCommand object required to perform updates at the data source.
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | QuoteIdentifier | Overridden. Places brackets around an identifier
Public method | RefreshSchema | Clears the commands associated with this DbCommandBuilder. (inherited from DbCommandBuilder)
Public method | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component)
Public method | UnquoteIdentifier | Overridden. Removes brackets around an identifier
Top

Public Events

 | Name | Description
Public event | Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component)
Top

Explicit Interface Implementations

Name | Description
SQLiteCommandBuilder | Overloaded. Initializes a new instance of the SQLiteCommandBuilder class.
Top

See Also

SQLiteCommandBuilder Class


SQLiteCommandBuilder Constructor

SQLiteCommandBuilder Constructor

Initializes a new instance of the SQLiteCommandBuilder class.

Overload List

 | Name | Description
Public method | SQLiteCommandBuilder | Default constructor
Public method | SQLiteCommandBuilder (SQLiteDataAdapter) | Initializes the command builder and associates it with the specified data adapter.

See Also

SQLiteCommandBuilder Class


SQLiteCommandBuilder Constructor ()

SQLiteCommandBuilder Constructor ()
See Also Example
[image]

Default constructor

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteCommandBuilder()
C++
public:
SQLiteCommandBuilder() sealed
J#
public SQLiteCommandBuilder()
JScript
public function SQLiteCommandBuilder()

See Also

SQLiteCommandBuilder Class
SQLiteCommandBuilder Constructor Overload List


SQLiteCommandBuilder Constructor (SQLiteDataAdapter)

SQLiteCommandBuilder Constructor (SQLiteDataAdapter)
See Also Example
[image]

Initializes the command builder and associates it with the specified data adapter.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal adp As SQLiteDataAdapter _
)
C#
public SQLiteCommandBuilder(
SQLiteDataAdapter adp
)
C++
public:
SQLiteCommandBuilder(
SQLiteDataAdapter adp
) sealed
J#
public SQLiteCommandBuilder(
SQLiteDataAdapter adp
)
JScript
public function SQLiteCommandBuilder(
adp : SQLiteDataAdapter
)

Parameters

adp

See Also

SQLiteCommandBuilder Class
SQLiteCommandBuilder Constructor Overload List


Properties

SQLiteCommandBuilder Properties
[image]

Public Properties

 | Name | Description
Public property | CatalogLocation | Overridden. Overridden to hide its property from the designer
Public property | CatalogSeparator | Overridden. Overridden to hide its property from the designer
Public property | ConflictOption | Specifies which ConflictOption is to be used by the DbCommandBuilder. (inherited from DbCommandBuilder)
Public property | Container | Gets the IContainer that contains the Component. (inherited from Component)
Public property | DataAdapter | Gets/sets the DataAdapter for this CommandBuilder
Public property | QuotePrefix | Overridden. Overridden to hide its property from the designer
Public property | QuoteSuffix | Overridden. Overridden to hide its property from the designer
Public property | SchemaSeparator | Overridden. Overridden to hide its property from the designer
Public property | SetAllValues | Specifies whether all column values in an update statement are included or only changed ones. (inherited from DbCommandBuilder)
Public property | Site | Gets or sets the ISite of the Component. (inherited from Component)
Top

See Also

SQLiteCommandBuilder Class


CatalogLocation Property

SQLiteCommandBuilder.CatalogLocation Property
[image]

Overridden to hide its property from the designer

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property CatalogLocation As CatalogLocation
C#
public override CatalogLocation CatalogLocation { get; set; }
C++
public override property CatalogLocation CatalogLocation override {
CatalogLocation get();
void set(CatalogLocation value);
}
J#
/** property */
public CatalogLocation get_CatalogLocation();

/** property */
public void set_CatalogLocation(CatalogLocation value);
JScript
public function get CatalogLocation() : CatalogLocation

public function set CatalogLocation(value : CatalogLocation);

See Also

SQLiteCommandBuilder Class


CatalogSeparator Property

SQLiteCommandBuilder.CatalogSeparator Property
[image]

Overridden to hide its property from the designer

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property CatalogSeparator As String
C#
public override string CatalogSeparator { get; set; }
C++
public override property string CatalogSeparator override {
String get();
void set(String value);
}
J#
/** property */
public string get_CatalogSeparator();

/** property */
public void set_CatalogSeparator(string value);
JScript
public function get CatalogSeparator() : String

public function set CatalogSeparator(value : String);

See Also

SQLiteCommandBuilder Class


DataAdapter Property

SQLiteCommandBuilder.DataAdapter Property
[image]

Gets/sets the DataAdapter for this CommandBuilder

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Property DataAdapter As SQLiteDataAdapter
C#
public new SQLiteDataAdapter DataAdapter { get; set; }
C++
public new property SQLiteDataAdapter DataAdapter sealed {
SQLiteDataAdapter get();
void set(SQLiteDataAdapter value);
}
J#
/** property */
public SQLiteDataAdapter get_DataAdapter();

/** property */
public void set_DataAdapter(SQLiteDataAdapter value);
JScript
public function get DataAdapter() : SQLiteDataAdapter

public function set DataAdapter(value : SQLiteDataAdapter);

See Also

SQLiteCommandBuilder Class


QuotePrefix Property

SQLiteCommandBuilder.QuotePrefix Property
[image]

Overridden to hide its property from the designer

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property QuotePrefix As String
C#
public override string QuotePrefix { get; set; }
C++
public override property string QuotePrefix override {
String get();
void set(String value);
}
J#
/** property */
public string get_QuotePrefix();

/** property */
public void set_QuotePrefix(string value);
JScript
public function get QuotePrefix() : String

public function set QuotePrefix(value : String);

See Also

SQLiteCommandBuilder Class


QuoteSuffix Property

SQLiteCommandBuilder.QuoteSuffix Property
[image]

Overridden to hide its property from the designer

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property QuoteSuffix As String
C#
public override string QuoteSuffix { get; set; }
C++
public override property string QuoteSuffix override {
String get();
void set(String value);
}
J#
/** property */
public string get_QuoteSuffix();

/** property */
public void set_QuoteSuffix(string value);
JScript
public function get QuoteSuffix() : String

public function set QuoteSuffix(value : String);

See Also

SQLiteCommandBuilder Class


SchemaSeparator Property

SQLiteCommandBuilder.SchemaSeparator Property
[image]

Overridden to hide its property from the designer

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property SchemaSeparator As String
C#
public override string SchemaSeparator { get; set; }
C++
public override property string SchemaSeparator override {
String get();
void set(String value);
}
J#
/** property */
public string get_SchemaSeparator();

/** property */
public void set_SchemaSeparator(string value);
JScript
public function get SchemaSeparator() : String

public function set SchemaSeparator(value : String);

See Also

SQLiteCommandBuilder Class


Methods

SQLiteCommandBuilder Methods
[image]

Public Methods

 | Name | Description
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Dispose | Releases all resources used by the Component. (inherited from Component)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetDeleteCommand | Overloaded. Gets the automatically generated DbCommand object required to perform deletions at the data source.
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetInsertCommand | Overloaded. Gets the automatically generated DbCommand object required to perform insertions at the data source.
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | GetUpdateCommand | Overloaded. Gets the automatically generated DbCommand object required to perform updates at the data source.
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | QuoteIdentifier | Overridden. Places brackets around an identifier
Public method | RefreshSchema | Clears the commands associated with this DbCommandBuilder. (inherited from DbCommandBuilder)
Public method | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component)
Public method | UnquoteIdentifier | Overridden. Removes brackets around an identifier
Top

See Also

SQLiteCommandBuilder Class


GetDeleteCommand Method

SQLiteCommandBuilder.GetDeleteCommand Method

Gets the automatically generated DbCommand object required to perform deletions at the data source.

Overload List

 | Name | Description
Public method | GetDeleteCommand | Returns the automatically-generated SQLite command to delete rows from the database
Public method | GetDeleteCommand (Boolean) | Returns the automatically-generated SQLite command to delete rows from the database

See Also

SQLiteCommandBuilder Class


GetDeleteCommand Method ()

SQLiteCommandBuilder.GetDeleteCommand Method ()
See Also Example
[image]

Returns the automatically-generated SQLite command to delete rows from the database

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function GetDeleteCommand() As SQLiteCommand
C#
public new SQLiteCommand GetDeleteCommand()
C++
public:
SQLiteCommand GetDeleteCommand() sealed
J#
public new SQLiteCommand GetDeleteCommand()
JScript
public function GetDeleteCommand() : SQLiteCommand

See Also

SQLiteCommandBuilder Class
SQLiteCommandBuilder.GetDeleteCommand Overload List


GetDeleteCommand Method (Boolean)

SQLiteCommandBuilder.GetDeleteCommand Method (Boolean)
See Also Example
[image]

Returns the automatically-generated SQLite command to delete rows from the database

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function GetDeleteCommand( _
ByVal useColumnsForParameterNames As Boolean _
) As SQLiteCommand
C#
public new SQLiteCommand GetDeleteCommand(
bool useColumnsForParameterNames
)
C++
public:
SQLiteCommand GetDeleteCommand(
bool useColumnsForParameterNames
) sealed
J#
public new SQLiteCommand GetDeleteCommand(
bool useColumnsForParameterNames
)
JScript
public function GetDeleteCommand(
useColumnsForParameterNames : bool
) : SQLiteCommand

Parameters

useColumnsForParameterNames

See Also

SQLiteCommandBuilder Class
SQLiteCommandBuilder.GetDeleteCommand Overload List


GetInsertCommand Method

SQLiteCommandBuilder.GetInsertCommand Method

Gets the automatically generated DbCommand object required to perform insertions at the data source.

Overload List

 | Name | Description
Public method | GetInsertCommand | Returns the automatically-generated SQLite command to insert rows into the database
Public method | GetInsertCommand (Boolean) | Returns the automatically-generated SQLite command to insert rows into the database

See Also

SQLiteCommandBuilder Class


GetInsertCommand Method ()

SQLiteCommandBuilder.GetInsertCommand Method ()
See Also Example
[image]

Returns the automatically-generated SQLite command to insert rows into the database

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function GetInsertCommand() As SQLiteCommand
C#
public new SQLiteCommand GetInsertCommand()
C++
public:
SQLiteCommand GetInsertCommand() sealed
J#
public new SQLiteCommand GetInsertCommand()
JScript
public function GetInsertCommand() : SQLiteCommand

See Also

SQLiteCommandBuilder Class
SQLiteCommandBuilder.GetInsertCommand Overload List


GetInsertCommand Method (Boolean)

SQLiteCommandBuilder.GetInsertCommand Method (Boolean)
See Also Example
[image]

Returns the automatically-generated SQLite command to insert rows into the database

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function GetInsertCommand( _
ByVal useColumnsForParameterNames As Boolean _
) As SQLiteCommand
C#
public new SQLiteCommand GetInsertCommand(
bool useColumnsForParameterNames
)
C++
public:
SQLiteCommand GetInsertCommand(
bool useColumnsForParameterNames
) sealed
J#
public new SQLiteCommand GetInsertCommand(
bool useColumnsForParameterNames
)
JScript
public function GetInsertCommand(
useColumnsForParameterNames : bool
) : SQLiteCommand

Parameters

useColumnsForParameterNames

See Also

SQLiteCommandBuilder Class
SQLiteCommandBuilder.GetInsertCommand Overload List


GetUpdateCommand Method

SQLiteCommandBuilder.GetUpdateCommand Method

Gets the automatically generated DbCommand object required to perform updates at the data source.

Overload List

 | Name | Description
Public method | GetUpdateCommand | Returns the automatically-generated SQLite command to update rows in the database
Public method | GetUpdateCommand (Boolean) | Returns the automatically-generated SQLite command to update rows in the database

See Also

SQLiteCommandBuilder Class


GetUpdateCommand Method ()

SQLiteCommandBuilder.GetUpdateCommand Method ()
See Also Example
[image]

Returns the automatically-generated SQLite command to update rows in the database

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function GetUpdateCommand() As SQLiteCommand
C#
public new SQLiteCommand GetUpdateCommand()
C++
public:
SQLiteCommand GetUpdateCommand() sealed
J#
public new SQLiteCommand GetUpdateCommand()
JScript
public function GetUpdateCommand() : SQLiteCommand

See Also

SQLiteCommandBuilder Class
SQLiteCommandBuilder.GetUpdateCommand Overload List


GetUpdateCommand Method (Boolean)

SQLiteCommandBuilder.GetUpdateCommand Method (Boolean)
See Also Example
[image]

Returns the automatically-generated SQLite command to update rows in the database

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function GetUpdateCommand( _
ByVal useColumnsForParameterNames As Boolean _
) As SQLiteCommand
C#
public new SQLiteCommand GetUpdateCommand(
bool useColumnsForParameterNames
)
C++
public:
SQLiteCommand GetUpdateCommand(
bool useColumnsForParameterNames
) sealed
J#
public new SQLiteCommand GetUpdateCommand(
bool useColumnsForParameterNames
)
JScript
public function GetUpdateCommand(
useColumnsForParameterNames : bool
) : SQLiteCommand

Parameters

useColumnsForParameterNames

See Also

SQLiteCommandBuilder Class
SQLiteCommandBuilder.GetUpdateCommand Overload List


QuoteIdentifier Method

SQLiteCommandBuilder.QuoteIdentifier Method
[image]

Places brackets around an identifier

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function QuoteIdentifier( _
ByVal unquotedIdentifier As String _
) As String
C#
public override string QuoteIdentifier(
string unquotedIdentifier
)
C++
public:
virtual String QuoteIdentifier(
String unquotedIdentifier
) override
J#
public override string QuoteIdentifier(
string unquotedIdentifier
)
JScript
public override function QuoteIdentifier(
unquotedIdentifier : String
) : String

Parameters

unquotedIdentifier
The identifier to quote

Return Value

The bracketed identifier

See Also

SQLiteCommandBuilder Class


UnquoteIdentifier Method

SQLiteCommandBuilder.UnquoteIdentifier Method
[image]

Removes brackets around an identifier

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function UnquoteIdentifier( _
ByVal quotedIdentifier As String _
) As String
C#
public override string UnquoteIdentifier(
string quotedIdentifier
)
C++
public:
virtual String UnquoteIdentifier(
String quotedIdentifier
) override
J#
public override string UnquoteIdentifier(
string quotedIdentifier
)
JScript
public override function UnquoteIdentifier(
quotedIdentifier : String
) : String

Parameters

quotedIdentifier
The quoted (bracketed) identifier

Return Value

The undecorated identifier

See Also

SQLiteCommandBuilder Class


SQLiteCommitHandler Delegate

SQLiteCommitHandler Delegate
[image]

Raised when a transaction is about to be committed. To roll back a transaction, set the rollbackTrans boolean value to true.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Delegate Sub SQLiteCommitHandler( _
ByVal sender As Object, _
ByVal e As CommitEventArgs _
)
C#
public delegate void SQLiteCommitHandler(
object sender,
CommitEventArgs e
)
C++
public delegate void SQLiteCommitHandler(
Object sender,
CommitEventArgs e
)
J#
/** delegate */
public delegate void SQLiteCommitHandler(
object sender,
CommitEventArgs e
)
JScript
JScript suports the use of delegates, but not the declaration of new ones.

Parameters

sender
The connection committing the transaction
e
Event arguments on the transaction

See Also


SQLiteConnection Class

SQLiteConnection Class
See Also Example Members
[image]

SQLite implentation of DbConnection. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteConnection
Inherits DbConnection
Implements ICloneable
C#
public sealed class SQLiteConnection : DbConnection, ICloneable
C++
ref class SQLiteConnection sealed : DbConnection, ICloneable
J#
public final class SQLiteConnection extends DbConnection implements ICloneable
JScript
public final class SQLiteConnection extends DbConnection, ICloneable

Remarks

The ConnectionString property of the SQLiteConnection class can contain the following parameter(s), delimited with a semi-colon:
Parameter | Values | Required | Default
Data Source | {filename} | Y |
Version | 3 | N | 3
UseUTF16Encoding | True False | N | False
DateTimeFormat | Ticks - Use DateTime.Ticks ISO8601 - Use ISO8601 DateTime format | N | ISO8601
BinaryGUID | True - Store GUID columns in binary form False - Store GUID columns as text | N | True
Cache Size | {size in bytes} | N | 2000
Synchronous | Normal - Normal file flushing behavior Full - Full flushing after all writes Off - Underlying OS flushes I/O's | N | Normal
Page Size | {size in bytes} | N | 1024
Password | {password} | N |
Enlist | Y - Automatically enlist in distributed transactions N - No automatic enlistment | N | Y
Pooling | True - Use connection pooling False - Do not use connection pooling | N | False
FailIfMissing | True - Don't create the database if it does not exist, throw an error instead False - Automatically create the database if it does not exist | N | False
Max Page Count | {size in pages} - Limits the maximum number of pages (limits the size) of the database | N | 0
Legacy Format | True - Use the more compatible legacy 3.x database format False - Use the newer 3.3x database format which compresses numbers more effectively | N | True
Default Timeout | {time in seconds} The default command timeout | N | 30

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbConnection
System.Data.SQLite.SQLiteConnection

See Also

SQLiteConnection Members


SQLiteConnection Members

SQLiteConnection Members
See Also Example Properties Methods Events Explicit Inteface Implementations
[image]

SQLite implentation of DbConnection. This class cannot be inherited.

The following tables list the members exposed by SQLiteConnection.

Public Constructors

Name | Description
SQLiteConnection | Overloaded. Constructs a new SQLiteConnection object
Top

Public Properties

 | Name | Description
Public property | ConnectionString | Overridden. The connection string containing the parameters for the connection
Public property | ConnectionTimeout | Gets the time to wait while establishing a connection before terminating the attempt and generating an error. (inherited from DbConnection)
Public property | Container | Gets the IContainer that contains the Component. (inherited from Component)
Public property | Database | Overridden. Returns an empty string
Public property | DataSource | Overridden. Returns the filename without extension or path
Public property | DbProviderFactory | Returns a SQLiteProviderFactory object. This will be mandatory in .NET 3.5, so we'll eat the warning for now and allow .NET 2.0 objects to have this capability
Public property | DefaultTimeout | Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible. This can also be set in the ConnectionString with "Default Timeout"
Public property | ServerVersion | Overridden. Returns the version of the underlying SQLite database engine
Public property | Site | Gets or sets the ISite of the Component. (inherited from Component)
Public property | State | Overridden. Returns the state of the connection.
Top

Public Methods

Name | Description
Public method | BeginTransaction | Overloaded. Starts a database transaction.
Public method | ChangeDatabase | Overridden. Not implemented
Public method | ChangePassword | Overloaded. Change the password (or assign a password) to an open database.
Public method | Clone | Creates a clone of the connection. All attached databases and user-defined functions are cloned. If the existing connection is open, the cloned connection will also be opened.
Public method | Close | Overridden. When the database connection is closed, all commands linked to this connection are automatically reset.
CompressFile | On NTFS volumes, this function turns on the compression attribute for the given file. It must not be open or referenced at the time of the function call.
Public method | CreateCommand | Create a new SQLiteCommand and associate it with this connection.
CreateFile | Creates a database file. This just creates a zero-byte file which SQLite will turn into a database when the file is opened properly.
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
DecompressFile | On NTFS volumes, this function removes the compression attribute for the given file. It must not be open or referenced at the time of the function call.
Public method | Dispose | Releases all resources used by the Component. (inherited from Component)
Public method | EnlistTransaction | Overridden. Manual distributed transaction enlistment support
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method GetSchema Overloaded. The following commands are used to extract schema information out of the database. Valid schema types are:
  • MetaDataCollections
  • DataSourceInformation
  • Catalogs
  • Columns
  • ForeignKeys
  • Indexes
  • IndexColumns
  • Tables
  • Views
  • ViewColumns
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | Open | Overridden. Opens the connection using the parameters found in the ConnectionString
Public method | SetPassword | Overloaded. Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set.
Public method | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component)
Top

Public Events

 | Name | Description
Public event | Commit | This event is raised whenever SQLite is committing a transaction. Return non-zero to trigger a rollback
Public event | Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component)
Public event | RollBack | This event is raised whenever SQLite is committing a transaction. Return non-zero to trigger a rollback
Public event | StateChange | Overridden. This event is raised whenever the database is opened or closed.
Public event | Update | This event is raised whenever SQLite makes an update/delete/insert into the database on this connection. It only applies to the given connection.
Top

Explicit Interface Implementations

Name | Description
SQLiteConnection | Overloaded. Constructs a new SQLiteConnection object
Top

See Also

SQLiteConnection Class


SQLiteConnection Constructor

SQLiteConnection Constructor

Constructs a new SQLiteConnection object

Overload List

 | Name | Description
Public method | SQLiteConnection | Default constructor
Public method | SQLiteConnection (SQLiteConnection) | Clones the settings and connection string from an existing connection. If the existing connection is already open, this function will open its own connection, enumerate any attached databases of the original connection, and automatically attach to them.
Public method | SQLiteConnection (String) | Initializes the connection with the specified connection string

See Also

SQLiteConnection Class


SQLiteConnection Constructor ()

SQLiteConnection Constructor ()
See Also Example
[image]

Default constructor

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteConnection()
C++
public:
SQLiteConnection() sealed
J#
public SQLiteConnection()
JScript
public function SQLiteConnection()

See Also

SQLiteConnection Class
SQLiteConnection Constructor Overload List


SQLiteConnection Constructor (SQLiteConnection)

SQLiteConnection Constructor (SQLiteConnection)
See Also Example
[image]

Clones the settings and connection string from an existing connection. If the existing connection is already open, this function will open its own connection, enumerate any attached databases of the original connection, and automatically attach to them.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal connection As SQLiteConnection _
)
C#
public SQLiteConnection(
SQLiteConnection connection
)
C++
public:
SQLiteConnection(
SQLiteConnection connection
) sealed
J#
public SQLiteConnection(
SQLiteConnection connection
)
JScript
public function SQLiteConnection(
connection : SQLiteConnection
)

Parameters

connection

See Also

SQLiteConnection Class
SQLiteConnection Constructor Overload List


SQLiteConnection Constructor (String)

SQLiteConnection Constructor (String)
See Also Example
[image]

Initializes the connection with the specified connection string

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal connectionString As String _
)
C#
public SQLiteConnection(
string connectionString
)
C++
public:
SQLiteConnection(
String connectionString
) sealed
J#
public SQLiteConnection(
string connectionString
)
JScript
public function SQLiteConnection(
connectionString : String
)

Parameters

connectionString
The connection string to use on the connection

See Also

SQLiteConnection Class
SQLiteConnection Constructor Overload List


Properties

SQLiteConnection Properties
[image]

Public Properties

 | Name | Description
Public property | ConnectionString | Overridden. The connection string containing the parameters for the connection
Public property | ConnectionTimeout | Gets the time to wait while establishing a connection before terminating the attempt and generating an error. (inherited from DbConnection)
Public property | Container | Gets the IContainer that contains the Component. (inherited from Component)
Public property | Database | Overridden. Returns an empty string
Public property | DataSource | Overridden. Returns the filename without extension or path
Public property | DbProviderFactory | Returns a SQLiteProviderFactory object. This will be mandatory in .NET 3.5, so we'll eat the warning for now and allow .NET 2.0 objects to have this capability
Public property | DefaultTimeout | Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible. This can also be set in the ConnectionString with "Default Timeout"
Public property | ServerVersion | Overridden. Returns the version of the underlying SQLite database engine
Public property | Site | Gets or sets the ISite of the Component. (inherited from Component)
Public property | State | Overridden. Returns the state of the connection.
Top

See Also

SQLiteConnection Class


ConnectionString Property

SQLiteConnection.ConnectionString Property
[image]

The connection string containing the parameters for the connection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property ConnectionString As String _
Implements IDbConnection.ConnectionString
C#
public override string ConnectionString { get; set; }
C++
public override property string ConnectionString override {
String get();
void set(String value);
}
J#
/** property */
public string get_ConnectionString();

/** property */
public void set_ConnectionString(string value);
JScript
public function get ConnectionString() : String

public function set ConnectionString(value : String);

Implements

IDbConnection.ConnectionString

Remarks

Parameter | Values | Required | Default
Data Source | {filename} | Y |
Version | 3 | N | 3
UseUTF16Encoding | True False | N | False
DateTimeFormat | Ticks - Use DateTime.Ticks ISO8601 - Use ISO8601 DateTime format JulianDay - Use JulianDay format | N | ISO8601
BinaryGUID | Yes/On/1 - Store GUID columns in binary form No/Off/0 - Store GUID columns as text | N | On
Cache Size | {size in bytes} | N | 2000
Synchronous | Normal - Normal file flushing behavior Full - Full flushing after all writes Off - Underlying OS flushes I/O's | N | Normal
Page Size | {size in bytes} | N | 1024
Password | {password} | N |
Enlist | Y - Automatically enlist in distributed transactions N - No automatic enlistment | N | Y
Pooling | True - Use connection pooling False - Do not use connection pooling | N | False
FailIfMissing | True - Don't create the database if it does not exist, throw an error instead False - Automatically create the database if it does not exist | N | False
Max Page Count | {size in pages} - Limits the maximum number of pages (limits the size) of the database | N | 0
Legacy Format | True - Use the more compatible legacy 3.x database format False - Use the newer 3.3x database format which compresses numbers more effectively | N | True
Default Timeout | {time in seconds} The default command timeout | N | 30

See Also

SQLiteConnection Class


Database Property

SQLiteConnection.Database Property
[image]

Returns an empty string

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property Database As String _
Implements IDbConnection.Database
C#
public override string Database { get; }
C++
public override property string Database override {
String get();
}
J#
/** property */
public string get_Database();
JScript
public function get Database() : String

Implements

IDbConnection.Database

See Also

SQLiteConnection Class


DataSource Property

SQLiteConnection.DataSource Property
[image]

Returns the filename without extension or path

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property DataSource As String
C#
public override string DataSource { get; }
C++
public override property string DataSource override {
String get();
}
J#
/** property */
public string get_DataSource();
JScript
public function get DataSource() : String

See Also

SQLiteConnection Class


DbProviderFactory Property

SQLiteConnection.DbProviderFactory Property
[image]

Returns a SQLiteProviderFactory object. This will be mandatory in .NET 3.5, so we'll eat the warning for now and allow .NET 2.0 objects to have this capability

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property DbProviderFactory As SQLiteFactory
C#
public SQLiteFactory DbProviderFactory { get; }
C++
public property SQLiteFactory DbProviderFactory sealed {
SQLiteFactory get();
}
J#
/** property */
public SQLiteFactory get_DbProviderFactory();
JScript
public function get DbProviderFactory() : SQLiteFactory

See Also

SQLiteConnection Class


DefaultTimeout Property

SQLiteConnection.DefaultTimeout Property
[image]

Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible. This can also be set in the ConnectionString with "Default Timeout"

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property DefaultTimeout As Integer
C#
public int DefaultTimeout { get; set; }
C++
public property int DefaultTimeout sealed {
int get();
void set(int value);
}
J#
/** property */
public int get_DefaultTimeout();

/** property */
public void set_DefaultTimeout(int value);
JScript
public function get DefaultTimeout() : int

public function set DefaultTimeout(value : int);

See Also

SQLiteConnection Class


ServerVersion Property

SQLiteConnection.ServerVersion Property
[image]

Returns the version of the underlying SQLite database engine

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property ServerVersion As String
C#
public override string ServerVersion { get; }
C++
public override property string ServerVersion override {
String get();
}
J#
/** property */
public string get_ServerVersion();
JScript
public function get ServerVersion() : String

See Also

SQLiteConnection Class


State Property

SQLiteConnection.State Property
[image]

Returns the state of the connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property State As ConnectionState _
Implements IDbConnection.State
C#
public override ConnectionState State { get; }
C++
public override property ConnectionState State override {
ConnectionState get();
}
J#
/** property */
public ConnectionState get_State();
JScript
public function get State() : ConnectionState

Implements

IDbConnection.State

See Also

SQLiteConnection Class


Methods

SQLiteConnection Methods
[image]

Public Methods

Name | Description
Public method | BeginTransaction | Overloaded. Starts a database transaction.
Public method | ChangeDatabase | Overridden. Not implemented
Public method | ChangePassword | Overloaded. Change the password (or assign a password) to an open database.
Public method | Clone | Creates a clone of the connection. All attached databases and user-defined functions are cloned. If the existing connection is open, the cloned connection will also be opened.
Public method | Close | Overridden. When the database connection is closed, all commands linked to this connection are automatically reset.
CompressFile | On NTFS volumes, this function turns on the compression attribute for the given file. It must not be open or referenced at the time of the function call.
Public method | CreateCommand | Create a new SQLiteCommand and associate it with this connection.
CreateFile | Creates a database file. This just creates a zero-byte file which SQLite will turn into a database when the file is opened properly.
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
DecompressFile | On NTFS volumes, this function removes the compression attribute for the given file. It must not be open or referenced at the time of the function call.
Public method | Dispose | Releases all resources used by the Component. (inherited from Component)
Public method | EnlistTransaction | Overridden. Manual distributed transaction enlistment support
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method GetSchema Overloaded. The following commands are used to extract schema information out of the database. Valid schema types are:
  • MetaDataCollections
  • DataSourceInformation
  • Catalogs
  • Columns
  • ForeignKeys
  • Indexes
  • IndexColumns
  • Tables
  • Views
  • ViewColumns
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | Open | Overridden. Opens the connection using the parameters found in the ConnectionString
Public method | SetPassword | Overloaded. Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set.
Public method | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component)
Top

See Also

SQLiteConnection Class


BeginTransaction Method

SQLiteConnection.BeginTransaction Method

Starts a database transaction.

Overload List

 | Name | Description
Public method | BeginTransaction | Creates a new SQLiteTransaction if one isn't already active on the connection.
Public method | BeginTransaction (Boolean) | Creates a new SQLiteTransaction if one isn't already active on the connection.
Public method | BeginTransaction (IsolationLevel) | Creates a new SQLiteTransaction if one isn't already active on the connection.
Public method | BeginTransaction (IsolationLevel, Boolean) | Creates a new SQLiteTransaction if one isn't already active on the connection.

See Also

SQLiteConnection Class


BeginTransaction Method ()

SQLiteConnection.BeginTransaction Method ()
See Also Example
[image]

Creates a new SQLiteTransaction if one isn't already active on the connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function BeginTransaction() As SQLiteTransaction
C#
public new SQLiteTransaction BeginTransaction()
C++
public:
SQLiteTransaction BeginTransaction() sealed
J#
public new SQLiteTransaction BeginTransaction()
JScript
public function BeginTransaction() : SQLiteTransaction

Return Value

Returns a SQLiteTransaction object.

See Also

SQLiteConnection Class
SQLiteConnection.BeginTransaction Overload List


BeginTransaction Method (Boolean)

SQLiteConnection.BeginTransaction Method (Boolean)
See Also Example
[image]

Creates a new SQLiteTransaction if one isn't already active on the connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function BeginTransaction( _
ByVal deferredLock As Boolean _
) As SQLiteTransaction
C#
public SQLiteTransaction BeginTransaction(
bool deferredLock
)
C++
public:
SQLiteTransaction BeginTransaction(
bool deferredLock
) sealed
J#
public SQLiteTransaction BeginTransaction(
bool deferredLock
)
JScript
public function BeginTransaction(
deferredLock : bool
) : SQLiteTransaction

Parameters

deferredLock
When TRUE, SQLite defers obtaining a write lock until a write operation is requested. When FALSE, a writelock is obtained immediately. The default is TRUE, but in a multi-threaded multi-writer environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock.

Return Value

Returns a SQLiteTransaction object.

See Also

SQLiteConnection Class
SQLiteConnection.BeginTransaction Overload List


BeginTransaction Method (IsolationLevel)

SQLiteConnection.BeginTransaction Method (IsolationLevel)
See Also Example
[image]

Creates a new SQLiteTransaction if one isn't already active on the connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function BeginTransaction( _
ByVal isolationLevel As IsolationLevel _
) As SQLiteTransaction
C#
public new SQLiteTransaction BeginTransaction(
IsolationLevel isolationLevel
)
C++
public:
SQLiteTransaction BeginTransaction(
IsolationLevel isolationLevel
) sealed
J#
public new SQLiteTransaction BeginTransaction(
IsolationLevel isolationLevel
)
JScript
public function BeginTransaction(
isolationLevel : IsolationLevel
) : SQLiteTransaction

Parameters

isolationLevel
SQLite supports only serializable transactions.

Return Value

Returns a SQLiteTransaction object.

See Also

SQLiteConnection Class
SQLiteConnection.BeginTransaction Overload List


BeginTransaction Method (IsolationLevel, Boolean)

SQLiteConnection.BeginTransaction Method (IsolationLevel, Boolean)
See Also Example
[image]

Creates a new SQLiteTransaction if one isn't already active on the connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function BeginTransaction( _
ByVal isolationLevel As IsolationLevel, _
ByVal deferredLock As Boolean _
) As SQLiteTransaction
C#
public SQLiteTransaction BeginTransaction(
IsolationLevel isolationLevel,
bool deferredLock
)
C++
public:
SQLiteTransaction BeginTransaction(
IsolationLevel isolationLevel,
bool deferredLock
) sealed
J#
public SQLiteTransaction BeginTransaction(
IsolationLevel isolationLevel,
bool deferredLock
)
JScript
public function BeginTransaction(
isolationLevel : IsolationLevel,
deferredLock : bool
) : SQLiteTransaction

Parameters

isolationLevel
SQLite doesn't support varying isolation levels, so this parameter is ignored.
deferredLock
When TRUE, SQLite defers obtaining a write lock until a write operation is requested. When FALSE, a writelock is obtained immediately. The default is TRUE, but in a multi-threaded multi-writer environment, one may instead choose to lock the database immediately to avoid any possible writer deadlock.

Return Value

Returns a SQLiteTransaction object.

See Also

SQLiteConnection Class
SQLiteConnection.BeginTransaction Overload List


ChangeDatabase Method

SQLiteConnection.ChangeDatabase Method
[image]

Not implemented

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub ChangeDatabase( _
ByVal databaseName As String _
) _
Implements IDbConnection.ChangeDatabase
C#
public override void ChangeDatabase(
string databaseName
)
C++
public:
virtual void ChangeDatabase(
String databaseName
) override
J#
public override void ChangeDatabase(
string databaseName
)
JScript
public override function ChangeDatabase(
databaseName : String
)

Parameters

databaseName

Implements

IDbConnection.ChangeDatabase

See Also

SQLiteConnection Class


ChangePassword Method

SQLiteConnection.ChangePassword Method

Change the password (or assign a password) to an open database.

Overload List

 | Name | Description
Public method | ChangePassword (Byte) | Change the password (or assign a password) to an open database.
Public method | ChangePassword (String) | Change the password (or assign a password) to an open database.

See Also

SQLiteConnection Class


ChangePassword Method (Byte[])

SQLiteConnection.ChangePassword Method (Byte[])
See Also Example
[image]

Change the password (or assign a password) to an open database.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub ChangePassword( _
ByVal newPassword As Byte() _
)
C#
public void ChangePassword(
byte[] newPassword
)
C++
public:
void ChangePassword(
array<char>^ newPassword
) sealed
J#
public void ChangePassword(
byte[] newPassword
)
JScript
public function ChangePassword(
newPassword : Byte[]
)

Parameters

newPassword
The new password to assign to the database

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.

See Also

SQLiteConnection Class
SQLiteConnection.ChangePassword Overload List


ChangePassword Method (String)

SQLiteConnection.ChangePassword Method (String)
See Also Example
[image]

Change the password (or assign a password) to an open database.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub ChangePassword( _
ByVal newPassword As String _
)
C#
public void ChangePassword(
string newPassword
)
C++
public:
void ChangePassword(
String newPassword
) sealed
J#
public void ChangePassword(
string newPassword
)
JScript
public function ChangePassword(
newPassword : String
)

Parameters

newPassword
The new password to assign to the database

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.

See Also

SQLiteConnection Class
SQLiteConnection.ChangePassword Overload List


Clone Method

SQLiteConnection.Clone Method
[image]

Creates a clone of the connection. All attached databases and user-defined functions are cloned. If the existing connection is open, the cloned connection will also be opened.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function Clone() As Object _
Implements ICloneable.Clone
C#
public object Clone()
C++
public:
Object Clone() sealed
J#
public object Clone()
JScript
public function Clone() : Object

Implements

ICloneable.Clone

See Also

SQLiteConnection Class


Close Method

SQLiteConnection.Close Method
[image]

When the database connection is closed, all commands linked to this connection are automatically reset.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Close() _
Implements IDbConnection.Close
C#
public override void Close()
C++
public:
virtual void Close() override
J#
public override void Close()
JScript
public override function Close()

Implements

IDbConnection.Close

See Also

SQLiteConnection Class


CompressFile Method

SQLiteConnection.CompressFile Method
[image]

On NTFS volumes, this function turns on the compression attribute for the given file. It must not be open or referenced at the time of the function call.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared Sub CompressFile( _
ByVal databaseFileName As String _
)
C#
public static void CompressFile(
string databaseFileName
)
C++
public:
static void CompressFile(
String databaseFileName
)
J#
public static void CompressFile(
string databaseFileName
)
JScript
public static function CompressFile(
databaseFileName : String
)

Parameters

databaseFileName
The file to compress

See Also

SQLiteConnection Class


CreateCommand Method

SQLiteConnection.CreateCommand Method
[image]

Create a new SQLiteCommand and associate it with this connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Function CreateCommand() As SQLiteCommand
C#
public new SQLiteCommand CreateCommand()
C++
public:
SQLiteCommand CreateCommand() sealed
J#
public new SQLiteCommand CreateCommand()
JScript
public function CreateCommand() : SQLiteCommand

Return Value

Returns an instantiated SQLiteCommand object already assigned to this connection.

See Also

SQLiteConnection Class


CreateFile Method

SQLiteConnection.CreateFile Method
[image]

Creates a database file. This just creates a zero-byte file which SQLite will turn into a database when the file is opened properly.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared Sub CreateFile( _
ByVal databaseFileName As String _
)
C#
public static void CreateFile(
string databaseFileName
)
C++
public:
static void CreateFile(
String databaseFileName
)
J#
public static void CreateFile(
string databaseFileName
)
JScript
public static function CreateFile(
databaseFileName : String
)

Parameters

databaseFileName
The file to create

See Also

SQLiteConnection Class


DecompressFile Method

SQLiteConnection.DecompressFile Method
[image]

On NTFS volumes, this function removes the compression attribute for the given file. It must not be open or referenced at the time of the function call.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared Sub DecompressFile( _
ByVal databaseFileName As String _
)
C#
public static void DecompressFile(
string databaseFileName
)
C++
public:
static void DecompressFile(
String databaseFileName
)
J#
public static void DecompressFile(
string databaseFileName
)
JScript
public static function DecompressFile(
databaseFileName : String
)

Parameters

databaseFileName
The file to decompress

See Also

SQLiteConnection Class


EnlistTransaction Method

SQLiteConnection.EnlistTransaction Method
[image]

Manual distributed transaction enlistment support

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub EnlistTransaction( _
ByVal transaction As Transaction _
)
C#
public override void EnlistTransaction(
Transaction transaction
)
C++
public:
virtual void EnlistTransaction(
Transaction transaction
) override
J#
public override void EnlistTransaction(
Transaction transaction
)
JScript
public override function EnlistTransaction(
transaction : Transaction
)

Parameters

transaction
The distributed transaction to enlist in

See Also

SQLiteConnection Class


GetSchema Method

SQLiteConnection.GetSchema Method

The following commands are used to extract schema information out of the database. Valid schema types are:

  • MetaDataCollections
  • DataSourceInformation
  • Catalogs
  • Columns
  • ForeignKeys
  • Indexes
  • IndexColumns
  • Tables
  • Views
  • ViewColumns

Overload List

 | Name | Description
Public method | GetSchema | Overridden. Returns the MetaDataCollections schema
Public method | GetSchema (String) | Overridden. Returns schema information of the specified collection
Public method | GetSchema (String, String) | Overridden. Retrieves schema information using the specified constraint(s) for the specified collection

See Also

SQLiteConnection Class


GetSchema Method ()

SQLiteConnection.GetSchema Method ()
See Also Example
[image]

Returns the MetaDataCollections schema

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetSchema() As DataTable
C#
public override DataTable GetSchema()
C++
public:
virtual DataTable GetSchema() override
J#
public override DataTable GetSchema()
JScript
public override function GetSchema() : DataTable

Return Value

A DataTable of the MetaDataCollections schema

See Also

SQLiteConnection Class
SQLiteConnection.GetSchema Overload List


GetSchema Method (String)

SQLiteConnection.GetSchema Method (String)
See Also Example
[image]

Returns schema information of the specified collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetSchema( _
ByVal collectionName As String _
) As DataTable
C#
public override DataTable GetSchema(
string collectionName
)
C++
public:
virtual DataTable GetSchema(
String collectionName
) override
J#
public override DataTable GetSchema(
string collectionName
)
JScript
public override function GetSchema(
collectionName : String
) : DataTable

Parameters

collectionName
The schema collection to retrieve

Return Value

A DataTable of the specified collection

See Also

SQLiteConnection Class
SQLiteConnection.GetSchema Overload List


GetSchema Method (String, String[])

SQLiteConnection.GetSchema Method (String, String[])
See Also Example
[image]

Retrieves schema information using the specified constraint(s) for the specified collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetSchema( _
ByVal collectionName As String, _
ByVal restrictionValues As String() _
) As DataTable
C#
public override DataTable GetSchema(
string collectionName,
string[] restrictionValues
)
C++
public:
virtual DataTable GetSchema(
String collectionName,
array<String>^ restrictionValues
) override
J#
public override DataTable GetSchema(
string collectionName,
string[] restrictionValues
)
JScript
public override function GetSchema(
collectionName : String,
restrictionValues : String[]
) : DataTable

Parameters

collectionName
The collection to retrieve
restrictionValues
The restrictions to impose

Return Value

A DataTable of the specified collection

See Also

SQLiteConnection Class
SQLiteConnection.GetSchema Overload List


Open Method

SQLiteConnection.Open Method
[image]

Opens the connection using the parameters found in the ConnectionString

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Open() _
Implements IDbConnection.Open
C#
public override void Open()
C++
public:
virtual void Open() override
J#
public override void Open()
JScript
public override function Open()

Implements

IDbConnection.Open

See Also

SQLiteConnection Class


SetPassword Method

SQLiteConnection.SetPassword Method

Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set.

Overload List

 | Name | Description
Public method | SetPassword (Byte) | Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set.
Public method | SetPassword (String) | Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set.

See Also

SQLiteConnection Class


SetPassword Method (Byte[])

SQLiteConnection.SetPassword Method (Byte[])
See Also Example
[image]

Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub SetPassword( _
ByVal databasePassword As Byte() _
)
C#
public void SetPassword(
byte[] databasePassword
)
C++
public:
void SetPassword(
array<char>^ databasePassword
) sealed
J#
public void SetPassword(
byte[] databasePassword
)
JScript
public function SetPassword(
databasePassword : Byte[]
)

Parameters

databasePassword
The password for the database

See Also

SQLiteConnection Class
SQLiteConnection.SetPassword Overload List


SetPassword Method (String)

SQLiteConnection.SetPassword Method (String)
See Also Example
[image]

Sets the password for a password-protected database. A password-protected database is unusable for any operation until the password has been set.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub SetPassword( _
ByVal databasePassword As String _
)
C#
public void SetPassword(
string databasePassword
)
C++
public:
void SetPassword(
String databasePassword
) sealed
J#
public void SetPassword(
string databasePassword
)
JScript
public function SetPassword(
databasePassword : String
)

Parameters

databasePassword
The password for the database

See Also

SQLiteConnection Class
SQLiteConnection.SetPassword Overload List


Events

SQLiteConnection Events
[image]

Public Events

 | Name | Description
Public event | Commit | This event is raised whenever SQLite is committing a transaction. Return non-zero to trigger a rollback
Public event | Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component)
Public event | RollBack | This event is raised whenever SQLite is committing a transaction. Return non-zero to trigger a rollback
Public event | StateChange | Overridden. This event is raised whenever the database is opened or closed.
Public event | Update | This event is raised whenever SQLite makes an update/delete/insert into the database on this connection. It only applies to the given connection.
Top

See Also

SQLiteConnection Class


Commit Event

SQLiteConnection.Commit Event
[image]

This event is raised whenever SQLite is committing a transaction. Return non-zero to trigger a rollback

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Event Commit As SQLiteCommitHandler
C#
public event SQLiteCommitHandler Commit
C++
public:
virtual event SQLiteCommitHandler Commit {
void add(SQLiteCommitHandler value) sealed ;
void remove(SQLiteCommitHandler value) sealed ;
}
J#
/** event */
public final void add_Commit(SQLiteCommitHandler value);

/** event */
public final void remove_Commit(SQLiteCommitHandler value);
JScript
JScript suports the use of events, but not the declaration of new ones.

See Also

SQLiteConnection Class


RollBack Event

SQLiteConnection.RollBack Event
[image]

This event is raised whenever SQLite is committing a transaction. Return non-zero to trigger a rollback

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Event RollBack As EventHandler
C#
public event EventHandler RollBack
C++
public:
virtual event EventHandler RollBack {
void add(EventHandler value) sealed ;
void remove(EventHandler value) sealed ;
}
J#
/** event */
public final void add_RollBack(EventHandler value);

/** event */
public final void remove_RollBack(EventHandler value);
JScript
JScript suports the use of events, but not the declaration of new ones.

See Also

SQLiteConnection Class


StateChange Event

SQLiteConnection.StateChange Event
[image]

This event is raised whenever the database is opened or closed.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Event StateChange As StateChangeEventHandler
C#
public override event StateChangeEventHandler StateChange
C++
public:
virtual virtual event StateChangeEventHandler StateChange {
void add(StateChangeEventHandler value) override ;
void remove(StateChangeEventHandler value) override ;
}
J#
/** event */
public override void add_StateChange(StateChangeEventHandler value);

/** event */
public override void remove_StateChange(StateChangeEventHandler value);
JScript
JScript suports the use of events, but not the declaration of new ones.

Event Data

The event handler receives an argument of type StateChangeEventArgs containing data related to this event. The following StateChangeEventArgs properties provide information specific to this event.

Property | Description
CurrentState | Gets the new state of the connection. The connection object will be in the new state already when the event is fired.
OriginalState | Gets the original state of the connection.

See Also

SQLiteConnection Class


Update Event

SQLiteConnection.Update Event
[image]

This event is raised whenever SQLite makes an update/delete/insert into the database on this connection. It only applies to the given connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Event Update As SQLiteUpdateEventHandler
C#
public event SQLiteUpdateEventHandler Update
C++
public:
virtual event SQLiteUpdateEventHandler Update {
void add(SQLiteUpdateEventHandler value) sealed ;
void remove(SQLiteUpdateEventHandler value) sealed ;
}
J#
/** event */
public final void add_Update(SQLiteUpdateEventHandler value);

/** event */
public final void remove_Update(SQLiteUpdateEventHandler value);
JScript
JScript suports the use of events, but not the declaration of new ones.

See Also

SQLiteConnection Class


SQLiteConnectionStringBuilder Class

SQLiteConnectionStringBuilder Class
See Also Example Members
[image]

SQLite implementation of DbConnectionStringBuilder. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteConnectionStringBuilder
Inherits DbConnectionStringBuilder
C#
public sealed class SQLiteConnectionStringBuilder : DbConnectionStringBuilder
C++
ref class SQLiteConnectionStringBuilder sealed : DbConnectionStringBuilder
J#
public final class SQLiteConnectionStringBuilder extends DbConnectionStringBuilder
JScript
public final class SQLiteConnectionStringBuilder extends DbConnectionStringBuilder

Inheritance Hierarchy

System.Object
System.Data.Common.DbConnectionStringBuilder
System.Data.SQLite.SQLiteConnectionStringBuilder

See Also

SQLiteConnectionStringBuilder Members


SQLiteConnectionStringBuilder Members

SQLiteConnectionStringBuilder Members
See Also Example Properties Methods Explicit Inteface Implementations
[image]

SQLite implementation of DbConnectionStringBuilder. This class cannot be inherited.

The following tables list the members exposed by SQLiteConnectionStringBuilder.

Public Constructors

Name | Description
SQLiteConnectionStringBuilder | Overloaded. Constructs a new instance of the class
Top

Public Properties

 | Name | Description
Public property | BinaryGUID | Gets/Sets whethor not to store GUID's in binary format. The default is True which saves space in the database.
Public property | BrowsableConnectionString | Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers. (inherited from DbConnectionStringBuilder)
Public property | CacheSize | Gets/Sets the cache size for the connection.
Public property | ConnectionString | Gets or sets the connection string associated with the DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public property | Count | Gets the current number of keys that are contained within the ConnectionString property. (inherited from DbConnectionStringBuilder)
Public property | DataSource | Gets/Sets the filename to open on the connection string.
Public property | DateTimeFormat | Gets/Sets the datetime format for the connection.
Public property | DefaultTimeout | Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible.
Public property | Enlist | Determines whether or not the connection will automatically participate in the current distributed transaction (if one exists)
Public property | FailIfMissing | If set to true, will throw an exception if the database specified in the connection string does not exist. If false, the database will be created automatically.
Public property | IsFixedSize | Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size. (inherited from DbConnectionStringBuilder)
Public property | IsReadOnly | Gets a value that indicates whether the DbConnectionStringBuilder is read-only. (inherited from DbConnectionStringBuilder)
Public property | Item | Gets or sets the value associated with the specified key. (inherited from DbConnectionStringBuilder)
Public property | Keys | Gets an ICollection that contains the keys in the DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public property | LegacyFormat | If enabled, uses the legacy 3.xx format for maximum compatibility, but results in larger database sizes.
Public property | MaxPageCount | Gets/Sets the maximum number of pages the database may hold
Public property | PageSize | Gets/Sets the page size for the connection.
Public property | Password | Gets/sets the database encryption password
Public property | Pooling | Gets/Sets whether or not to use connection pooling. The default is "False"
Public property | SyncMode | Gets/Sets the synchronous mode of the connection string. Default is "Normal".
Public property | UseUTF16Encoding | Gets/Sets the encoding for the connection string. The default is "False" which indicates UTF-8 encoding.
Public property | Values | Gets an ICollection that contains the values in the DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public property | Version | Gets/Sets the default version of the SQLite engine to instantiate. Currently the only valid value is 3, indicating version 3 of the sqlite library.
Top

Public Methods

 | Name | Description
Public method | Add | Adds an entry with the specified key and value into the DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public method | Clear | Clears the contents of the DbConnectionStringBuilder instance. (inherited from DbConnectionStringBuilder)
Public method | ContainsKey | Determines whether the DbConnectionStringBuilder contains a specific key. (inherited from DbConnectionStringBuilder)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | EquivalentTo | Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object. (inherited from DbConnectionStringBuilder)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | Remove | Removes the entry with the specified key from the DbConnectionStringBuilder instance. (inherited from DbConnectionStringBuilder)
Public method | ShouldSerialize | Indicates whether the specified key exists in this DbConnectionStringBuilder instance. (inherited from DbConnectionStringBuilder)
Public method | ToString | Returns the connection string associated with this DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public method | TryGetValue | Overridden. Helper function for retrieving values from the connectionstring
Top

Protected Methods

 | Name | Description
Family method | ClearPropertyDescriptors | Clears the collection of PropertyDescriptor objects on the associated DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Top

Explicit Interface Implementations

Name | Description
SQLiteConnectionStringBuilder | Overloaded. Constructs a new instance of the class
Top

See Also

SQLiteConnectionStringBuilder Class


SQLiteConnectionStringBuilder Constructor

SQLiteConnectionStringBuilder Constructor

Constructs a new instance of the class

Overload List

 | Name | Description
Public method | SQLiteConnectionStringBuilder | Default constructor
Public method | SQLiteConnectionStringBuilder (String) | Constructs a new instance of the class using the specified connection string.

See Also

SQLiteConnectionStringBuilder Class


SQLiteConnectionStringBuilder Constructor ()

SQLiteConnectionStringBuilder Constructor ()
See Also Example
[image]

Default constructor

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteConnectionStringBuilder()
C++
public:
SQLiteConnectionStringBuilder() sealed
J#
public SQLiteConnectionStringBuilder()
JScript
public function SQLiteConnectionStringBuilder()

See Also

SQLiteConnectionStringBuilder Class
SQLiteConnectionStringBuilder Constructor Overload List


SQLiteConnectionStringBuilder Constructor (String)

SQLiteConnectionStringBuilder Constructor (String)
See Also Example
[image]

Constructs a new instance of the class using the specified connection string.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal connectionString As String _
)
C#
public SQLiteConnectionStringBuilder(
string connectionString
)
C++
public:
SQLiteConnectionStringBuilder(
String connectionString
) sealed
J#
public SQLiteConnectionStringBuilder(
string connectionString
)
JScript
public function SQLiteConnectionStringBuilder(
connectionString : String
)

Parameters

connectionString
The connection string to parse

See Also

SQLiteConnectionStringBuilder Class
SQLiteConnectionStringBuilder Constructor Overload List


Properties

SQLiteConnectionStringBuilder Properties
[image]

Public Properties

 | Name | Description
Public property | BinaryGUID | Gets/Sets whethor not to store GUID's in binary format. The default is True which saves space in the database.
Public property | BrowsableConnectionString | Gets or sets a value that indicates whether the ConnectionString property is visible in Visual Studio designers. (inherited from DbConnectionStringBuilder)
Public property | CacheSize | Gets/Sets the cache size for the connection.
Public property | ConnectionString | Gets or sets the connection string associated with the DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public property | Count | Gets the current number of keys that are contained within the ConnectionString property. (inherited from DbConnectionStringBuilder)
Public property | DataSource | Gets/Sets the filename to open on the connection string.
Public property | DateTimeFormat | Gets/Sets the datetime format for the connection.
Public property | DefaultTimeout | Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible.
Public property | Enlist | Determines whether or not the connection will automatically participate in the current distributed transaction (if one exists)
Public property | FailIfMissing | If set to true, will throw an exception if the database specified in the connection string does not exist. If false, the database will be created automatically.
Public property | IsFixedSize | Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size. (inherited from DbConnectionStringBuilder)
Public property | IsReadOnly | Gets a value that indicates whether the DbConnectionStringBuilder is read-only. (inherited from DbConnectionStringBuilder)
Public property | Item | Gets or sets the value associated with the specified key. (inherited from DbConnectionStringBuilder)
Public property | Keys | Gets an ICollection that contains the keys in the DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public property | LegacyFormat | If enabled, uses the legacy 3.xx format for maximum compatibility, but results in larger database sizes.
Public property | MaxPageCount | Gets/Sets the maximum number of pages the database may hold
Public property | PageSize | Gets/Sets the page size for the connection.
Public property | Password | Gets/sets the database encryption password
Public property | Pooling | Gets/Sets whether or not to use connection pooling. The default is "False"
Public property | SyncMode | Gets/Sets the synchronous mode of the connection string. Default is "Normal".
Public property | UseUTF16Encoding | Gets/Sets the encoding for the connection string. The default is "False" which indicates UTF-8 encoding.
Public property | Values | Gets an ICollection that contains the values in the DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public property | Version | Gets/Sets the default version of the SQLite engine to instantiate. Currently the only valid value is 3, indicating version 3 of the sqlite library.
Top

See Also

SQLiteConnectionStringBuilder Class


BinaryGUID Property

SQLiteConnectionStringBuilder.BinaryGUID Property
[image]

Gets/Sets whethor not to store GUID's in binary format. The default is True which saves space in the database.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property BinaryGUID As Boolean
C#
public bool BinaryGUID { get; set; }
C++
public property bool BinaryGUID sealed {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_BinaryGUID();

/** property */
public void set_BinaryGUID(bool value);
JScript
public function get BinaryGUID() : bool

public function set BinaryGUID(value : bool);

See Also

SQLiteConnectionStringBuilder Class


CacheSize Property

SQLiteConnectionStringBuilder.CacheSize Property
[image]

Gets/Sets the cache size for the connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property CacheSize As Integer
C#
public int CacheSize { get; set; }
C++
public property int CacheSize sealed {
int get();
void set(int value);
}
J#
/** property */
public int get_CacheSize();

/** property */
public void set_CacheSize(int value);
JScript
public function get CacheSize() : int

public function set CacheSize(value : int);

See Also

SQLiteConnectionStringBuilder Class


DataSource Property

SQLiteConnectionStringBuilder.DataSource Property
[image]

Gets/Sets the filename to open on the connection string.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property DataSource As String
C#
public string DataSource { get; set; }
C++
public property string DataSource sealed {
String get();
void set(String value);
}
J#
/** property */
public string get_DataSource();

/** property */
public void set_DataSource(string value);
JScript
public function get DataSource() : String

public function set DataSource(value : String);

See Also

SQLiteConnectionStringBuilder Class


DateTimeFormat Property

SQLiteConnectionStringBuilder.DateTimeFormat Property
[image]

Gets/Sets the datetime format for the connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property DateTimeFormat As SQLiteDateFormats
C#
public SQLiteDateFormats DateTimeFormat { get; set; }
C++
public property SQLiteDateFormats DateTimeFormat sealed {
SQLiteDateFormats get();
void set(SQLiteDateFormats value);
}
J#
/** property */
public SQLiteDateFormats get_DateTimeFormat();

/** property */
public void set_DateTimeFormat(SQLiteDateFormats value);
JScript
public function get DateTimeFormat() : SQLiteDateFormats

public function set DateTimeFormat(value : SQLiteDateFormats);

See Also

SQLiteConnectionStringBuilder Class


DefaultTimeout Property

SQLiteConnectionStringBuilder.DefaultTimeout Property
[image]

Gets/sets the default command timeout for newly-created commands. This is especially useful for commands used internally such as inside a SQLiteTransaction, where setting the timeout is not possible.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property DefaultTimeout As Integer
C#
public int DefaultTimeout { get; set; }
C++
public property int DefaultTimeout sealed {
int get();
void set(int value);
}
J#
/** property */
public int get_DefaultTimeout();

/** property */
public void set_DefaultTimeout(int value);
JScript
public function get DefaultTimeout() : int

public function set DefaultTimeout(value : int);

See Also

SQLiteConnectionStringBuilder Class


Enlist Property

SQLiteConnectionStringBuilder.Enlist Property
[image]

Determines whether or not the connection will automatically participate in the current distributed transaction (if one exists)

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property Enlist As Boolean
C#
public bool Enlist { get; set; }
C++
public property bool Enlist sealed {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_Enlist();

/** property */
public void set_Enlist(bool value);
JScript
public function get Enlist() : bool

public function set Enlist(value : bool);

See Also

SQLiteConnectionStringBuilder Class


FailIfMissing Property

SQLiteConnectionStringBuilder.FailIfMissing Property
[image]

If set to true, will throw an exception if the database specified in the connection string does not exist. If false, the database will be created automatically.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property FailIfMissing As Boolean
C#
public bool FailIfMissing { get; set; }
C++
public property bool FailIfMissing sealed {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_FailIfMissing();

/** property */
public void set_FailIfMissing(bool value);
JScript
public function get FailIfMissing() : bool

public function set FailIfMissing(value : bool);

See Also

SQLiteConnectionStringBuilder Class


LegacyFormat Property

SQLiteConnectionStringBuilder.LegacyFormat Property
[image]

If enabled, uses the legacy 3.xx format for maximum compatibility, but results in larger database sizes.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property LegacyFormat As Boolean
C#
public bool LegacyFormat { get; set; }
C++
public property bool LegacyFormat sealed {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_LegacyFormat();

/** property */
public void set_LegacyFormat(bool value);
JScript
public function get LegacyFormat() : bool

public function set LegacyFormat(value : bool);

See Also

SQLiteConnectionStringBuilder Class


MaxPageCount Property

SQLiteConnectionStringBuilder.MaxPageCount Property
[image]

Gets/Sets the maximum number of pages the database may hold

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property MaxPageCount As Integer
C#
public int MaxPageCount { get; set; }
C++
public property int MaxPageCount sealed {
int get();
void set(int value);
}
J#
/** property */
public int get_MaxPageCount();

/** property */
public void set_MaxPageCount(int value);
JScript
public function get MaxPageCount() : int

public function set MaxPageCount(value : int);

See Also

SQLiteConnectionStringBuilder Class


PageSize Property

SQLiteConnectionStringBuilder.PageSize Property
[image]

Gets/Sets the page size for the connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property PageSize As Integer
C#
public int PageSize { get; set; }
C++
public property int PageSize sealed {
int get();
void set(int value);
}
J#
/** property */
public int get_PageSize();

/** property */
public void set_PageSize(int value);
JScript
public function get PageSize() : int

public function set PageSize(value : int);

See Also

SQLiteConnectionStringBuilder Class


Password Property

SQLiteConnectionStringBuilder.Password Property
[image]

Gets/sets the database encryption password

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property Password As String
C#
public string Password { get; set; }
C++
public property string Password sealed {
String get();
void set(String value);
}
J#
/** property */
public string get_Password();

/** property */
public void set_Password(string value);
JScript
public function get Password() : String

public function set Password(value : String);

See Also

SQLiteConnectionStringBuilder Class


Pooling Property

SQLiteConnectionStringBuilder.Pooling Property
[image]

Gets/Sets whether or not to use connection pooling. The default is "False"

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property Pooling As Boolean
C#
public bool Pooling { get; set; }
C++
public property bool Pooling sealed {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_Pooling();

/** property */
public void set_Pooling(bool value);
JScript
public function get Pooling() : bool

public function set Pooling(value : bool);

See Also

SQLiteConnectionStringBuilder Class


SyncMode Property

SQLiteConnectionStringBuilder.SyncMode Property
[image]

Gets/Sets the synchronous mode of the connection string. Default is "Normal".

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property SyncMode As SynchronizationModes
C#
public SynchronizationModes SyncMode { get; set; }
C++
public property SynchronizationModes SyncMode sealed {
SynchronizationModes get();
void set(SynchronizationModes value);
}
J#
/** property */
public SynchronizationModes get_SyncMode();

/** property */
public void set_SyncMode(SynchronizationModes value);
JScript
public function get SyncMode() : SynchronizationModes

public function set SyncMode(value : SynchronizationModes);

See Also

SQLiteConnectionStringBuilder Class


UseUTF16Encoding Property

SQLiteConnectionStringBuilder.UseUTF16Encoding Property
[image]

Gets/Sets the encoding for the connection string. The default is "False" which indicates UTF-8 encoding.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property UseUTF16Encoding As Boolean
C#
public bool UseUTF16Encoding { get; set; }
C++
public property bool UseUTF16Encoding sealed {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_UseUTF16Encoding();

/** property */
public void set_UseUTF16Encoding(bool value);
JScript
public function get UseUTF16Encoding() : bool

public function set UseUTF16Encoding(value : bool);

See Also

SQLiteConnectionStringBuilder Class


Version Property

SQLiteConnectionStringBuilder.Version Property
[image]

Gets/Sets the default version of the SQLite engine to instantiate. Currently the only valid value is 3, indicating version 3 of the sqlite library.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property Version As Integer
C#
public int Version { get; set; }
C++
public property int Version sealed {
int get();
void set(int value);
}
J#
/** property */
public int get_Version();

/** property */
public void set_Version(int value);
JScript
public function get Version() : int

public function set Version(value : int);

See Also

SQLiteConnectionStringBuilder Class


Methods

SQLiteConnectionStringBuilder Methods
[image]

Public Methods

 | Name | Description
Public method | Add | Adds an entry with the specified key and value into the DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public method | Clear | Clears the contents of the DbConnectionStringBuilder instance. (inherited from DbConnectionStringBuilder)
Public method | ContainsKey | Determines whether the DbConnectionStringBuilder contains a specific key. (inherited from DbConnectionStringBuilder)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | EquivalentTo | Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object. (inherited from DbConnectionStringBuilder)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | Remove | Removes the entry with the specified key from the DbConnectionStringBuilder instance. (inherited from DbConnectionStringBuilder)
Public method | ShouldSerialize | Indicates whether the specified key exists in this DbConnectionStringBuilder instance. (inherited from DbConnectionStringBuilder)
Public method | ToString | Returns the connection string associated with this DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Public method | TryGetValue | Overridden. Helper function for retrieving values from the connectionstring
Top

Protected Methods

 | Name | Description
Family method | ClearPropertyDescriptors | Clears the collection of PropertyDescriptor objects on the associated DbConnectionStringBuilder. (inherited from DbConnectionStringBuilder)
Top

See Also

SQLiteConnectionStringBuilder Class


TryGetValue Method

SQLiteConnectionStringBuilder.TryGetValue Method
[image]

Helper function for retrieving values from the connectionstring

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function TryGetValue( _
ByVal keyword As String, _
ByRef value As Object _
) As Boolean
C#
public override bool TryGetValue(
string keyword,
out object value
)
C++
public:
virtual bool TryGetValue(
String keyword,
Object% value
) override
J#
public override bool TryGetValue(
string keyword,
/** @ref */ object value
)
JScript
public override function TryGetValue(
keyword : String,
value : Object
) : bool

Parameters

keyword
The keyword to retrieve settings for
value
The resulting parameter value

Return Value

Returns true if the value was found and returned

See Also

SQLiteConnectionStringBuilder Class


SQLiteConvert Class

SQLiteConvert Class
See Also Example Members
[image]

This base class provides datatype conversion services for the SQLite provider. This class is abstract (MustInherit in Visual Basic)abstractMustInherit and so cannot be instantiated.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public MustInherit Class SQLiteConvert
C#
public abstract class SQLiteConvert
C++
ref class SQLiteConvert abstract
J#
public class SQLiteConvert
JScript
public class SQLiteConvert

Inheritance Hierarchy

System.Object
System.Data.SQLite.SQLiteConvert

See Also

SQLiteConvert Members


SQLiteConvert Members

SQLiteConvert Members
See Also Example Methods
[image]

This base class provides datatype conversion services for the SQLite provider. This class is abstract (MustInherit in Visual Basic)abstractMustInherit and so cannot be instantiated.

The following tables list the members exposed by SQLiteConvert.

Public Methods

 | Name | Description
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
 | Split | Smart method of splitting a string. Skips quoted elements, removes the quotes.
Public method | ToDateTime | Overloaded. Converts a julianday value into a DateTime
Public method | ToJulianDay | Converts a DateTime struct to a JulianDay double
Public method | ToString | Overloaded. Returns a String that represents the current Object.
Public method | ToUTF8 | Overloaded. Convert a DateTime to a UTF-8 encoded, zero-terminated byte array.
 | UTF8ToString | Converts a UTF-8 encoded IntPtr of the specified length into a .NET string
Top

Protected Methods

 | Name | Description
Family method | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method | MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object)
Top

See Also

SQLiteConvert Class


Methods

SQLiteConvert Methods
[image]

Public Methods

 | Name | Description
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
 | Split | Smart method of splitting a string. Skips quoted elements, removes the quotes.
Public method | ToDateTime | Overloaded. Converts a julianday value into a DateTime
Public method | ToJulianDay | Converts a DateTime struct to a JulianDay double
Public method | ToString | Overloaded. Returns a String that represents the current Object.
Public method | ToUTF8 | Overloaded. Convert a DateTime to a UTF-8 encoded, zero-terminated byte array.
 | UTF8ToString | Converts a UTF-8 encoded IntPtr of the specified length into a .NET string
Top

Protected Methods

 | Name | Description
Family method | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method | MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object)
Top

See Also

SQLiteConvert Class


Split Method

SQLiteConvert.Split Method
[image]

Smart method of splitting a string. Skips quoted elements, removes the quotes.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared Function Split( _
ByVal source As String, _
ByVal separator As Char _
) As String()
C#
public static string[] Split(
string source,
char separator
)
C++
public:
static array<String>^ Split(
String source,
wchar_t separator
)
J#
public static string[] Split(
string source,
char separator
)
JScript
public static function Split(
source : String,
separator : char
) : String[]

Parameters

source
Source string to split apart
separator
Separator character

Return Value

A string array of the split up elements

Remarks

This split function works somewhat like the String.Split() function in that it breaks apart a string into pieces and returns the pieces as an array. The primary differences are:

  • Only one character can be provided as a separator character
  • Quoted text inside the string is skipped over when searching for the separator, and the quotes are removed.
Thus, if splitting the following string looking for a comma:
One,Two, "Three, Four", Five

The resulting array would contain
[0] One
[1] Two
[2] Three, Four
[3] Five

Note that the leading and trailing spaces were removed from each item during the split.

See Also

SQLiteConvert Class


ToDateTime Method

SQLiteConvert.ToDateTime Method

Converts a julianday value into a DateTime

Overload List

 | Name | Description
Public method | ToDateTime (Double) | Converts a julianday value into a DateTime
Public method | ToDateTime (String) | Converts a string into a DateTime, using the current DateTimeFormat specified for the connection when it was opened.

See Also

SQLiteConvert Class


ToDateTime Method (Double)

SQLiteConvert.ToDateTime Method (Double)
See Also Example
[image]

Converts a julianday value into a DateTime

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function ToDateTime( _
ByVal julianDay As Double _
) As Date
C#
public DateTime ToDateTime(
double julianDay
)
C++
public:
DateTime ToDateTime(
double julianDay
) sealed
J#
public DateTime ToDateTime(
double julianDay
)
JScript
public function ToDateTime(
julianDay : double
) : DateTime

Parameters

julianDay
The value to convert

Return Value

A .NET DateTime

See Also

SQLiteConvert Class
SQLiteConvert.ToDateTime Overload List


ToDateTime Method (String)

SQLiteConvert.ToDateTime Method (String)
See Also Example
[image]

Converts a string into a DateTime, using the current DateTimeFormat specified for the connection when it was opened.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function ToDateTime( _
ByVal dateText As String _
) As Date
C#
public DateTime ToDateTime(
string dateText
)
C++
public:
DateTime ToDateTime(
String dateText
) sealed
J#
public DateTime ToDateTime(
string dateText
)
JScript
public function ToDateTime(
dateText : String
) : DateTime

Parameters

dateText
The string containing either a Tick value, a JulianDay double, or an ISO8601-format string

Return Value

A DateTime value

Remarks

Acceptable ISO8601 DateTime formats are: yyyy-MM-dd HH:mm:ss yyyyMMddHHmmss yyyyMMddTHHmmssfffffff yyyy-MM-dd yy-MM-dd yyyyMMdd HH:mm:ss THHmmss

See Also

SQLiteConvert Class
SQLiteConvert.ToDateTime Overload List


ToJulianDay Method

SQLiteConvert.ToJulianDay Method
[image]

Converts a DateTime struct to a JulianDay double

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function ToJulianDay( _
ByVal value As Date _
) As Double
C#
public double ToJulianDay(
DateTime value
)
C++
public:
double ToJulianDay(
DateTime value
) sealed
J#
public double ToJulianDay(
DateTime value
)
JScript
public function ToJulianDay(
value : DateTime
) : double

Parameters

value
The DateTime to convert

Return Value

The JulianDay value the Datetime represents

See Also

SQLiteConvert Class


ToString Method

SQLiteConvert.ToString Method

Returns a String that represents the current Object.

Overload List

 | Name | Description
Public method | ToString (DateTime) | Converts a DateTime to a string value, using the current DateTimeFormat specified for the connection when it was opened.
Public method | ToString (IntPtr, Int32) | Converts a UTF-8 encoded IntPtr of the specified length into a .NET string
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)

See Also

SQLiteConvert Class


ToString Method (DateTime)

SQLiteConvert.ToString Method (DateTime)
See Also Example
[image]

Converts a DateTime to a string value, using the current DateTimeFormat specified for the connection when it was opened.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function ToString( _
ByVal dateValue As Date _
) As String
C#
public string ToString(
DateTime dateValue
)
C++
public:
String ToString(
DateTime dateValue
) sealed
J#
public string ToString(
DateTime dateValue
)
JScript
public function ToString(
dateValue : DateTime
) : String

Parameters

dateValue
The DateTime value to convert

Return Value

Either a string consisting of the tick count for DateTimeFormat.Ticks, a JulianDay double, or a date/time in ISO8601 format.

See Also

SQLiteConvert Class
SQLiteConvert.ToString Overload List


ToString Method (IntPtr, Int32)

SQLiteConvert.ToString Method (IntPtr, Int32)
See Also Example
[image]

Converts a UTF-8 encoded IntPtr of the specified length into a .NET string

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overridable Function ToString( _
ByVal nativestring As IntPtr, _
ByVal nativestringlen As Integer _
) As String
C#
public virtual string ToString(
IntPtr nativestring,
int nativestringlen
)
C++
public:
virtual String ToString(
IntPtr nativestring,
int nativestringlen
)
J#
public virtual string ToString(
IntPtr nativestring,
int nativestringlen
)
JScript
public virtual function ToString(
nativestring : IntPtr,
nativestringlen : int
) : String

Parameters

nativestring
The pointer to the memory where the UTF-8 string is encoded
nativestringlen
The number of bytes to decode

Return Value

A string containing the translated character(s)

See Also

SQLiteConvert Class
SQLiteConvert.ToString Overload List


ToUTF8 Method

SQLiteConvert.ToUTF8 Method

Convert a DateTime to a UTF-8 encoded, zero-terminated byte array.

Overload List

 | Name | Description
Public method | ToUTF8 (DateTime) | Convert a DateTime to a UTF-8 encoded, zero-terminated byte array.
Public method | ToUTF8 (String) | Converts a string to a UTF-8 encoded byte array sized to include a null-terminating character.

See Also

SQLiteConvert Class


ToUTF8 Method (DateTime)

SQLiteConvert.ToUTF8 Method (DateTime)
See Also Example
[image]

Convert a DateTime to a UTF-8 encoded, zero-terminated byte array.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function ToUTF8( _
ByVal dateTimeValue As Date _
) As Byte()
C#
public byte[] ToUTF8(
DateTime dateTimeValue
)
C++
public:
array<char>^ ToUTF8(
DateTime dateTimeValue
) sealed
J#
public byte[] ToUTF8(
DateTime dateTimeValue
)
JScript
public function ToUTF8(
dateTimeValue : DateTime
) : Byte[]

Parameters

dateTimeValue
The DateTime to convert.

Return Value

The UTF-8 encoded string, including a 0 terminating byte at the end of the array.

Remarks

This function is a convenience function, which first calls ToString() on the DateTime, and then calls ToUTF8() with the string result.

See Also

SQLiteConvert Class
SQLiteConvert.ToUTF8 Overload List


ToUTF8 Method (String)

SQLiteConvert.ToUTF8 Method (String)
See Also Example
[image]

Converts a string to a UTF-8 encoded byte array sized to include a null-terminating character.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function ToUTF8( _
ByVal sourceText As String _
) As Byte()
C#
public byte[] ToUTF8(
string sourceText
)
C++
public:
array<char>^ ToUTF8(
String sourceText
) sealed
J#
public byte[] ToUTF8(
string sourceText
)
JScript
public function ToUTF8(
sourceText : String
) : Byte[]

Parameters

sourceText
The string to convert to UTF-8

Return Value

A byte array containing the converted string plus an extra 0 terminating byte at the end of the array.

See Also

SQLiteConvert Class
SQLiteConvert.ToUTF8 Overload List


UTF8ToString Method

SQLiteConvert.UTF8ToString Method
[image]

Converts a UTF-8 encoded IntPtr of the specified length into a .NET string

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared Function UTF8ToString( _
ByVal nativestring As IntPtr, _
ByVal nativestringlen As Integer _
) As String
C#
public static string UTF8ToString(
IntPtr nativestring,
int nativestringlen
)
C++
public:
static String UTF8ToString(
IntPtr nativestring,
int nativestringlen
)
J#
public static string UTF8ToString(
IntPtr nativestring,
int nativestringlen
)
JScript
public static function UTF8ToString(
nativestring : IntPtr,
nativestringlen : int
) : String

Parameters

nativestring
The pointer to the memory where the UTF-8 string is encoded
nativestringlen
The number of bytes to decode

Return Value

A string containing the translated character(s)

See Also

SQLiteConvert Class


SQLiteDataAdapter Class

SQLiteDataAdapter Class
See Also Example Members
[image]

SQLite implementation of DbDataAdapter. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteDataAdapter
Inherits DbDataAdapter
C#
public sealed class SQLiteDataAdapter : DbDataAdapter
C++
ref class SQLiteDataAdapter sealed : DbDataAdapter
J#
public final class SQLiteDataAdapter extends DbDataAdapter
JScript
public final class SQLiteDataAdapter extends DbDataAdapter

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DataAdapter
System.Data.Common.DbDataAdapter
System.Data.SQLite.SQLiteDataAdapter

See Also

SQLiteDataAdapter Members


SQLiteDataAdapter Members

SQLiteDataAdapter Members
See Also Example Properties Methods Events Explicit Inteface Implementations
[image]

SQLite implementation of DbDataAdapter. This class cannot be inherited.

The following tables list the members exposed by SQLiteDataAdapter.

Public Constructors

Name | Description
SQLiteDataAdapter | Overloaded. This class is just a shell around the DbDataAdapter. Nothing from DbDataAdapter is overridden here, just a few constructors are defined.
Top

Public Properties

 | Name | Description
Public property | AcceptChangesDuringFill | Gets or sets a value indicating whether AcceptChanges is called on a DataRow after it is added to the DataTable during any of the Fill operations. (inherited from DataAdapter)
Public property | AcceptChangesDuringUpdate | Gets or sets whether AcceptChanges is called during a Update. (inherited from DataAdapter)
Public property | Container | Gets the IContainer that contains the Component. (inherited from Component)
Public property | ContinueUpdateOnError | Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update. (inherited from DataAdapter)
Public property | DeleteCommand | Gets/sets the delete command for this DataAdapter
Public property | FillLoadOption | Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader. (inherited from DataAdapter)
Public property | InsertCommand | Gets/sets the insert command for this DataAdapter
Public property | MissingMappingAction | Determines the action to take when incoming data does not have a matching table or column. (inherited from DataAdapter)
Public property | MissingSchemaAction | Determines the action to take when existing DataSet schema does not match incoming data. (inherited from DataAdapter)
Public property | ReturnProviderSpecificTypes | Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values. (inherited from DataAdapter)
Public property | SelectCommand | Gets/sets the select command for this DataAdapter
Public property | Site | Gets or sets the ISite of the Component. (inherited from Component)
Public property | TableMappings | Gets a collection that provides the master mapping between a source table and a DataTable. (inherited from DataAdapter)
Public property | UpdateBatchSize | Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch. (inherited from DbDataAdapter)
Public property | UpdateCommand | Gets/sets the update command for this DataAdapter
Top

Protected Properties

 | Name | Description
Family property | FillCommandBehavior | Gets or sets the behavior of the command used to fill the data adapter. (inherited from DbDataAdapter)
Top

Public Methods

 | Name | Description
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Dispose | Releases all resources used by the Component. (inherited from Component)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | Fill | Overloaded. Fills a DataSet or a DataTable. (inherited from DbDataAdapter)
Public method | FillSchema | Overloaded. Adds a DataTable to a DataSet and configures the schema to match that in the data source. (inherited from DbDataAdapter)
Public method | GetFillParameters | Gets the parameters set by the user when executing an SQL SELECT statement. (inherited from DbDataAdapter)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | ResetFillLoadOption | Resets FillLoadOption to its default state and causes Fill to honor AcceptChangesDuringFill. (inherited from DataAdapter)
Public method | ShouldSerializeAcceptChangesDuringFill | Determines whether the AcceptChangesDuringFill property should be persisted. (inherited from DataAdapter)
Public method | ShouldSerializeFillLoadOption | Determines whether the FillLoadOption property should be persisted. (inherited from DataAdapter)
Public method | ToString | Returns a String containing the name of the Component, if any. This method should not be overridden. (inherited from Component)
Public method | Update | Overloaded. Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the DataSet. (inherited from DbDataAdapter)
Top

Public Events

 | Name | Description
Public event | Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component)
Public event | FillError | Returned when an error occurs during a fill operation. (inherited from DataAdapter)
Public event | RowUpdated | Row updated event handler
Public event | RowUpdating | Row updating event handler
Top

Explicit Interface Implementations

Name | Description
SQLiteDataAdapter | Overloaded. This class is just a shell around the DbDataAdapter. Nothing from DbDataAdapter is overridden here, just a few constructors are defined.
Top

See Also

SQLiteDataAdapter Class


SQLiteDataAdapter Constructor

SQLiteDataAdapter Constructor

This class is just a shell around the DbDataAdapter. Nothing from DbDataAdapter is overridden here, just a few constructors are defined.

Overload List

 | Name | Description
Public method | SQLiteDataAdapter | Default constructor.
Public method | SQLiteDataAdapter (SQLiteCommand) | Constructs a data adapter using the specified select command.
Public method | SQLiteDataAdapter (String, SQLiteConnection) | Constructs a data adapter with the supplied select command text and associated with the specified connection.
Public method | SQLiteDataAdapter (String, String) | Constructs a data adapter with the specified select command text, and using the specified database connection string.

See Also

SQLiteDataAdapter Class


SQLiteDataAdapter Constructor ()

SQLiteDataAdapter Constructor ()
See Also Example
[image]

Default constructor.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteDataAdapter()
C++
public:
SQLiteDataAdapter() sealed
J#
public SQLiteDataAdapter()
JScript
public function SQLiteDataAdapter()

See Also

SQLiteDataAdapter Class
SQLiteDataAdapter Constructor Overload List


SQLiteDataAdapter Constructor (SQLiteCommand)

SQLiteDataAdapter Constructor (SQLiteCommand)
See Also Example
[image]

Constructs a data adapter using the specified select command.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal cmd As SQLiteCommand _
)
C#
public SQLiteDataAdapter(
SQLiteCommand cmd
)
C++
public:
SQLiteDataAdapter(
SQLiteCommand cmd
) sealed
J#
public SQLiteDataAdapter(
SQLiteCommand cmd
)
JScript
public function SQLiteDataAdapter(
cmd : SQLiteCommand
)

Parameters

cmd
The select command to associate with the adapter.

See Also

SQLiteDataAdapter Class
SQLiteDataAdapter Constructor Overload List


SQLiteDataAdapter Constructor (String, SQLiteConnection)

SQLiteDataAdapter Constructor (String, SQLiteConnection)
See Also Example
[image]

Constructs a data adapter with the supplied select command text and associated with the specified connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal commandText As String, _
ByVal connection As SQLiteConnection _
)
C#
public SQLiteDataAdapter(
string commandText,
SQLiteConnection connection
)
C++
public:
SQLiteDataAdapter(
String commandText,
SQLiteConnection connection
) sealed
J#
public SQLiteDataAdapter(
string commandText,
SQLiteConnection connection
)
JScript
public function SQLiteDataAdapter(
commandText : String,
connection : SQLiteConnection
)

Parameters

commandText
The select command text to associate with the data adapter.
connection
The connection to associate with the select command.

See Also

SQLiteDataAdapter Class
SQLiteDataAdapter Constructor Overload List


SQLiteDataAdapter Constructor (String, String)

SQLiteDataAdapter Constructor (String, String)
See Also Example
[image]

Constructs a data adapter with the specified select command text, and using the specified database connection string.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal commandText As String, _
ByVal connectionString As String _
)
C#
public SQLiteDataAdapter(
string commandText,
string connectionString
)
C++
public:
SQLiteDataAdapter(
String commandText,
String connectionString
) sealed
J#
public SQLiteDataAdapter(
string commandText,
string connectionString
)
JScript
public function SQLiteDataAdapter(
commandText : String,
connectionString : String
)

Parameters

commandText
The select command text to use to construct a select command.
connectionString
A connection string suitable for passing to a new SQLiteConnection, which is associated with the select command.

See Also

SQLiteDataAdapter Class
SQLiteDataAdapter Constructor Overload List


Properties

SQLiteDataAdapter Properties
[image]

Public Properties

 | Name | Description
Public property | AcceptChangesDuringFill | Gets or sets a value indicating whether AcceptChanges is called on a DataRow after it is added to the DataTable during any of the Fill operations. (inherited from DataAdapter)
Public property | AcceptChangesDuringUpdate | Gets or sets whether AcceptChanges is called during a Update. (inherited from DataAdapter)
Public property | Container | Gets the IContainer that contains the Component. (inherited from Component)
Public property | ContinueUpdateOnError | Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update. (inherited from DataAdapter)
Public property | DeleteCommand | Gets/sets the delete command for this DataAdapter
Public property | FillLoadOption | Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader. (inherited from DataAdapter)
Public property | InsertCommand | Gets/sets the insert command for this DataAdapter
Public property | MissingMappingAction | Determines the action to take when incoming data does not have a matching table or column. (inherited from DataAdapter)
Public property | MissingSchemaAction | Determines the action to take when existing DataSet schema does not match incoming data. (inherited from DataAdapter)
Public property | ReturnProviderSpecificTypes | Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values. (inherited from DataAdapter)
Public property | SelectCommand | Gets/sets the select command for this DataAdapter
Public property | Site | Gets or sets the ISite of the Component. (inherited from Component)
Public property | TableMappings | Gets a collection that provides the master mapping between a source table and a DataTable. (inherited from DataAdapter)
Public property | UpdateBatchSize | Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch. (inherited from DbDataAdapter)
Public property | UpdateCommand | Gets/sets the update command for this DataAdapter
Top

Protected Properties

 | Name | Description
Family property | FillCommandBehavior | Gets or sets the behavior of the command used to fill the data adapter. (inherited from DbDataAdapter)
Top

See Also

SQLiteDataAdapter Class


DeleteCommand Property

SQLiteDataAdapter.DeleteCommand Property
[image]

Gets/sets the delete command for this DataAdapter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Property DeleteCommand As SQLiteCommand
C#
public new SQLiteCommand DeleteCommand { get; set; }
C++
public new property SQLiteCommand DeleteCommand sealed {
SQLiteCommand get();
void set(SQLiteCommand value);
}
J#
/** property */
public SQLiteCommand get_DeleteCommand();

/** property */
public void set_DeleteCommand(SQLiteCommand value);
JScript
public function get DeleteCommand() : SQLiteCommand

public function set DeleteCommand(value : SQLiteCommand);

See Also

SQLiteDataAdapter Class


InsertCommand Property

SQLiteDataAdapter.InsertCommand Property
[image]

Gets/sets the insert command for this DataAdapter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Property InsertCommand As SQLiteCommand
C#
public new SQLiteCommand InsertCommand { get; set; }
C++
public new property SQLiteCommand InsertCommand sealed {
SQLiteCommand get();
void set(SQLiteCommand value);
}
J#
/** property */
public SQLiteCommand get_InsertCommand();

/** property */
public void set_InsertCommand(SQLiteCommand value);
JScript
public function get InsertCommand() : SQLiteCommand

public function set InsertCommand(value : SQLiteCommand);

See Also

SQLiteDataAdapter Class


SelectCommand Property

SQLiteDataAdapter.SelectCommand Property
[image]

Gets/sets the select command for this DataAdapter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Property SelectCommand As SQLiteCommand
C#
public new SQLiteCommand SelectCommand { get; set; }
C++
public new property SQLiteCommand SelectCommand sealed {
SQLiteCommand get();
void set(SQLiteCommand value);
}
J#
/** property */
public SQLiteCommand get_SelectCommand();

/** property */
public void set_SelectCommand(SQLiteCommand value);
JScript
public function get SelectCommand() : SQLiteCommand

public function set SelectCommand(value : SQLiteCommand);

See Also

SQLiteDataAdapter Class


UpdateCommand Property

SQLiteDataAdapter.UpdateCommand Property
[image]

Gets/sets the update command for this DataAdapter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Property UpdateCommand As SQLiteCommand
C#
public new SQLiteCommand UpdateCommand { get; set; }
C++
public new property SQLiteCommand UpdateCommand sealed {
SQLiteCommand get();
void set(SQLiteCommand value);
}
J#
/** property */
public SQLiteCommand get_UpdateCommand();

/** property */
public void set_UpdateCommand(SQLiteCommand value);
JScript
public function get UpdateCommand() : SQLiteCommand

public function set UpdateCommand(value : SQLiteCommand);

See Also

SQLiteDataAdapter Class


Events

SQLiteDataAdapter Events
[image]

Public Events

 | Name | Description
Public event | Disposed | Occurs when the component is disposed by a call to the Dispose method. (inherited from Component)
Public event | FillError | Returned when an error occurs during a fill operation. (inherited from DataAdapter)
Public event | RowUpdated | Row updated event handler
Public event | RowUpdating | Row updating event handler
Top

See Also

SQLiteDataAdapter Class


RowUpdated Event

SQLiteDataAdapter.RowUpdated Event
[image]

Row updated event handler

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Event RowUpdated As EventHandler(Of RowUpdatedEventArgs)
C#
public event EventHandler<RowUpdatedEventArgs> RowUpdated
C++
public:
virtual event EventHandler<RowUpdatedEventArgs> RowUpdated {
void add(EventHandler<RowUpdatedEventArgs> value) sealed ;
void remove(EventHandler<RowUpdatedEventArgs> value) sealed ;
}
J#
/** event */
public final void add_RowUpdated(EventHandler<RowUpdatedEventArgs> value);

/** event */
public final void remove_RowUpdated(EventHandler<RowUpdatedEventArgs> value);
JScript
JScript suports the use of events, but not the declaration of new ones.

Event Data

The event handler receives an argument of type RowUpdatedEventArgs containing data related to this event. The following RowUpdatedEventArgs properties provide information specific to this event.

Property | Description
Command | Gets the IDbCommand executed when Update is called.
Errors | Gets any errors generated by the .NET Framework data provider when the Command was executed.
RecordsAffected | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Row | Gets the DataRow sent through an Update.
RowCount | Gets the number of rows processed in a batch of updated records.
StatementType | Gets the type of SQL statement executed.
Status | Gets the UpdateStatus of the Command property.
TableMapping | Gets the DataTableMapping sent through an Update.

See Also

SQLiteDataAdapter Class


RowUpdating Event

SQLiteDataAdapter.RowUpdating Event
[image]

Row updating event handler

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Event RowUpdating As EventHandler(Of RowUpdatingEventArgs)
C#
public event EventHandler<RowUpdatingEventArgs> RowUpdating
C++
public:
virtual event EventHandler<RowUpdatingEventArgs> RowUpdating {
void add(EventHandler<RowUpdatingEventArgs> value) sealed ;
void remove(EventHandler<RowUpdatingEventArgs> value) sealed ;
}
J#
/** event */
public final void add_RowUpdating(EventHandler<RowUpdatingEventArgs> value);

/** event */
public final void remove_RowUpdating(EventHandler<RowUpdatingEventArgs> value);
JScript
JScript suports the use of events, but not the declaration of new ones.

Event Data

The event handler receives an argument of type RowUpdatingEventArgs containing data related to this event. The following RowUpdatingEventArgs properties provide information specific to this event.

Property | Description
BaseCommand | Gets or sets the IDbCommand object for an instance of this class.
Command | Gets the IDbCommand to execute during the Update operation.
Errors | Gets any errors generated by the .NET Framework data provider when the Command executes.
Row | Gets the DataRow that will be sent to the server as part of an insert, update, or delete operation.
StatementType | Gets the type of SQL statement to execute.
Status | Gets or sets the UpdateStatus of the Command property.
TableMapping | Gets the DataTableMapping to send through the Update.

See Also

SQLiteDataAdapter Class


SQLiteDataReader Class

SQLiteDataReader Class
See Also Example Members
[image]

SQLite implementation of DbDataReader. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteDataReader
Inherits DbDataReader
C#
public sealed class SQLiteDataReader : DbDataReader
C++
ref class SQLiteDataReader sealed : DbDataReader
J#
public final class SQLiteDataReader extends DbDataReader
JScript
public final class SQLiteDataReader extends DbDataReader

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbDataReader
System.Data.SQLite.SQLiteDataReader

See Also

SQLiteDataReader Members


SQLiteDataReader Members

SQLiteDataReader Members
See Also Example Properties Methods
[image]

SQLite implementation of DbDataReader. This class cannot be inherited.

The following tables list the members exposed by SQLiteDataReader.

Public Properties

 | Name | Description
Public property | Depth | Overridden. Not implemented. Returns 0
Public property | FieldCount | Overridden. Returns the number of columns in the current resultset
Public property | HasRows | Overridden. Returns True if the resultset has rows that can be fetched
Public property | IsClosed | Overridden. Returns True if the data reader is closed
Public property | Item | Overloaded. Gets the value of a specified column as an instance of Object.
Public property | RecordsAffected | Overridden. Retrieve the count of records affected by an update/insert command. Only valid once the data reader is closed!
Public property | VisibleFieldCount | Overridden. Returns the number of visible fielsd in the current resultset
Top

Public Methods

 | Name | Description
Public method | Close | Overridden. Closes the datareader, potentially closing the connection as well if CommandBehavior.CloseConnection was specified.
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Dispose | Releases all resources used by the current instance of the DbDataReader class. (inherited from DbDataReader)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetBoolean | Overridden. Retrieves the column as a boolean value
Public method | GetByte | Overridden. Retrieves the column as a single byte value
Public method | GetBytes | Overridden. Retrieves a column as an array of bytes (blob)
Public method | GetChar | Overridden. Returns the column as a single character
Public method | GetChars | Overridden. Retrieves a column as an array of chars (blob)
Public method | GetData | Returns a DbDataReader object for the requested column ordinal. (inherited from DbDataReader)
Public method | GetDataTypeName | Overridden. Retrieves the name of the back-end datatype of the column
Public method | GetDateTime | Overridden. Retrieve the column as a date/time value
Public method | GetDecimal | Overridden. Retrieve the column as a decimal value
Public method | GetDouble | Overridden. Returns the column as a double
Public method | GetEnumerator | Overridden. Enumerator support
Public method | GetFieldType | Overridden. Returns the .NET type of a given column
Public method | GetFloat | Overridden. Returns a column as a float value
Public method | GetGuid | Overridden. Returns the column as a Guid
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetInt16 | Overridden. Returns the column as a short
Public method | GetInt32 | Overridden. Retrieves the column as an int
Public method | GetInt64 | Overridden. Retrieves the column as a long
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetName | Overridden. Retrieves the name of the column
Public method | GetOrdinal | Overridden. Retrieves the i of a column, given its name
Public method | GetProviderSpecificFieldType | Returns the provider-specific field type of the specified column. (inherited from DbDataReader)
Public method | GetProviderSpecificValue | Gets the value of the specified column as an instance of Object. (inherited from DbDataReader)
Public method | GetProviderSpecificValues | Gets all provider-specific attribute columns in the collection for the current row. (inherited from DbDataReader)
Public method | GetSchemaTable | Overridden. Schema information in SQLite is difficult to map into .NET conventions, so a lot of work must be done to gather the necessary information so it can be represented in an ADO.NET manner.
Public method | GetString | Overridden. Retrieves the column as a string
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | GetValue | Overridden. Retrieves the column as an object corresponding to the underlying datatype of the column
Public method | GetValues | Overridden. Retreives the values of multiple columns, up to the size of the supplied array
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | IsDBNull | Overridden. Returns True if the specified column is null
Public method | NextResult | Overridden. Moves to the next resultset in multiple row-returning SQL command.
Public method | Read | Overridden. Reads the next row from the resultset
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteDataReader Class


Properties

SQLiteDataReader Properties
[image]

Public Properties

 | Name | Description
Public property | Depth | Overridden. Not implemented. Returns 0
Public property | FieldCount | Overridden. Returns the number of columns in the current resultset
Public property | HasRows | Overridden. Returns True if the resultset has rows that can be fetched
Public property | IsClosed | Overridden. Returns True if the data reader is closed
Public property | Item | Overloaded. Gets the value of a specified column as an instance of Object.
Public property | RecordsAffected | Overridden. Retrieve the count of records affected by an update/insert command. Only valid once the data reader is closed!
Public property | VisibleFieldCount | Overridden. Returns the number of visible fielsd in the current resultset
Top

See Also

SQLiteDataReader Class


Depth Property

SQLiteDataReader.Depth Property
[image]

Not implemented. Returns 0

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property Depth As Integer _
Implements IDataReader.Depth
C#
public override int Depth { get; }
C++
public override property int Depth override {
int get();
}
J#
/** property */
public int get_Depth();
JScript
public function get Depth() : int

Implements

IDataReader.Depth

See Also

SQLiteDataReader Class


FieldCount Property

SQLiteDataReader.FieldCount Property
[image]

Returns the number of columns in the current resultset

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property FieldCount As Integer _
Implements IDataRecord.FieldCount
C#
public override int FieldCount { get; }
C++
public override property int FieldCount override {
int get();
}
J#
/** property */
public int get_FieldCount();
JScript
public function get FieldCount() : int

Implements

IDataRecord.FieldCount

See Also

SQLiteDataReader Class


HasRows Property

SQLiteDataReader.HasRows Property
[image]

Returns True if the resultset has rows that can be fetched

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property HasRows As Boolean
C#
public override bool HasRows { get; }
C++
public override property bool HasRows override {
bool get();
}
J#
/** property */
public bool get_HasRows();
JScript
public function get HasRows() : bool

See Also

SQLiteDataReader Class


IsClosed Property

SQLiteDataReader.IsClosed Property
[image]

Returns True if the data reader is closed

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property IsClosed As Boolean _
Implements IDataReader.IsClosed
C#
public override bool IsClosed { get; }
C++
public override property bool IsClosed override {
bool get();
}
J#
/** property */
public bool get_IsClosed();
JScript
public function get IsClosed() : bool

Implements

IDataReader.IsClosed

See Also

SQLiteDataReader Class


Item Property

SQLiteDataReader.Item Property

Gets the value of a specified column as an instance of Object.

Overload List

 | Name | Description
Public property | Item (Int32) | Overridden. Indexer to retrieve data from a column given its i
Public property | Item (String) | Overridden. Indexer to retrieve data from a column given its name

See Also

SQLiteDataReader Class


Item Property (Int32)

SQLiteDataReader.Item Property (Int32)
See Also Example
[image]

Indexer to retrieve data from a column given its i

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Default ReadOnly Property Item( _
ByVal i As Integer _
) As Object _
Implements IDataRecord.Item
C#
public override object this[
int i
] { get; }
C++
public override property object default[int i] override {
Object get(int i);
}
J#
/** property */
public object get_Item(int i);
JScript
JScript supports the use of indexed properties, but not the declaration of new ones.

Parameters

i
The index of the column to retrieve

Property Value

The value contained in the column

Implements

IDataRecord.Item

See Also

SQLiteDataReader Class
SQLiteDataReader.Item Overload List


Item Property (String)

SQLiteDataReader.Item Property (String)
See Also Example
[image]

Indexer to retrieve data from a column given its name

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Default ReadOnly Property Item( _
ByVal name As String _
) As Object _
Implements IDataRecord.Item
C#
public override object this[
string name
] { get; }
C++
public override property object default[String name] override {
Object get(String name);
}
J#
/** property */
public object get_Item(string name);
JScript
JScript supports the use of indexed properties, but not the declaration of new ones.

Parameters

name
The name of the column to retrieve data for

Property Value

The value contained in the column

Implements

IDataRecord.Item

See Also

SQLiteDataReader Class
SQLiteDataReader.Item Overload List


RecordsAffected Property

SQLiteDataReader.RecordsAffected Property
[image]

Retrieve the count of records affected by an update/insert command. Only valid once the data reader is closed!

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property RecordsAffected As Integer _
Implements IDataReader.RecordsAffected
C#
public override int RecordsAffected { get; }
C++
public override property int RecordsAffected override {
int get();
}
J#
/** property */
public int get_RecordsAffected();
JScript
public function get RecordsAffected() : int

Implements

IDataReader.RecordsAffected

See Also

SQLiteDataReader Class


VisibleFieldCount Property

SQLiteDataReader.VisibleFieldCount Property
[image]

Returns the number of visible fielsd in the current resultset

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property VisibleFieldCount As Integer
C#
public override int VisibleFieldCount { get; }
C++
public override property int VisibleFieldCount override {
int get();
}
J#
/** property */
public int get_VisibleFieldCount();
JScript
public function get VisibleFieldCount() : int

See Also

SQLiteDataReader Class


Methods

SQLiteDataReader Methods
[image]

Public Methods

 | Name | Description
Public method | Close | Overridden. Closes the datareader, potentially closing the connection as well if CommandBehavior.CloseConnection was specified.
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Dispose | Releases all resources used by the current instance of the DbDataReader class. (inherited from DbDataReader)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetBoolean | Overridden. Retrieves the column as a boolean value
Public method | GetByte | Overridden. Retrieves the column as a single byte value
Public method | GetBytes | Overridden. Retrieves a column as an array of bytes (blob)
Public method | GetChar | Overridden. Returns the column as a single character
Public method | GetChars | Overridden. Retrieves a column as an array of chars (blob)
Public method | GetData | Returns a DbDataReader object for the requested column ordinal. (inherited from DbDataReader)
Public method | GetDataTypeName | Overridden. Retrieves the name of the back-end datatype of the column
Public method | GetDateTime | Overridden. Retrieve the column as a date/time value
Public method | GetDecimal | Overridden. Retrieve the column as a decimal value
Public method | GetDouble | Overridden. Returns the column as a double
Public method | GetEnumerator | Overridden. Enumerator support
Public method | GetFieldType | Overridden. Returns the .NET type of a given column
Public method | GetFloat | Overridden. Returns a column as a float value
Public method | GetGuid | Overridden. Returns the column as a Guid
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetInt16 | Overridden. Returns the column as a short
Public method | GetInt32 | Overridden. Retrieves the column as an int
Public method | GetInt64 | Overridden. Retrieves the column as a long
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetName | Overridden. Retrieves the name of the column
Public method | GetOrdinal | Overridden. Retrieves the i of a column, given its name
Public method | GetProviderSpecificFieldType | Returns the provider-specific field type of the specified column. (inherited from DbDataReader)
Public method | GetProviderSpecificValue | Gets the value of the specified column as an instance of Object. (inherited from DbDataReader)
Public method | GetProviderSpecificValues | Gets all provider-specific attribute columns in the collection for the current row. (inherited from DbDataReader)
Public method | GetSchemaTable | Overridden. Schema information in SQLite is difficult to map into .NET conventions, so a lot of work must be done to gather the necessary information so it can be represented in an ADO.NET manner.
Public method | GetString | Overridden. Retrieves the column as a string
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | GetValue | Overridden. Retrieves the column as an object corresponding to the underlying datatype of the column
Public method | GetValues | Overridden. Retreives the values of multiple columns, up to the size of the supplied array
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | IsDBNull | Overridden. Returns True if the specified column is null
Public method | NextResult | Overridden. Moves to the next resultset in multiple row-returning SQL command.
Public method | Read | Overridden. Reads the next row from the resultset
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteDataReader Class


Close Method

SQLiteDataReader.Close Method
[image]

Closes the datareader, potentially closing the connection as well if CommandBehavior.CloseConnection was specified.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Close() _
Implements IDataReader.Close
C#
public override void Close()
C++
public:
virtual void Close() override
J#
public override void Close()
JScript
public override function Close()

Implements

IDataReader.Close

See Also

SQLiteDataReader Class


GetBoolean Method

SQLiteDataReader.GetBoolean Method
[image]

Retrieves the column as a boolean value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetBoolean( _
ByVal i As Integer _
) As Boolean _
Implements IDataRecord.GetBoolean
C#
public override bool GetBoolean(
int i
)
C++
public:
virtual bool GetBoolean(
int i
) override
J#
public override bool GetBoolean(
int i
)
JScript
public override function GetBoolean(
i : int
) : bool

Parameters

i
The index of the column to retrieve

Return Value

bool

Implements

IDataRecord.GetBoolean

See Also

SQLiteDataReader Class


GetByte Method

SQLiteDataReader.GetByte Method
[image]

Retrieves the column as a single byte value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetByte( _
ByVal i As Integer _
) As Byte _
Implements IDataRecord.GetByte
C#
public override byte GetByte(
int i
)
C++
public:
virtual char GetByte(
int i
) override
J#
public override byte GetByte(
int i
)
JScript
public override function GetByte(
i : int
) : Byte

Parameters

i
The index of the column to retrieve

Return Value

byte

Implements

IDataRecord.GetByte

See Also

SQLiteDataReader Class


GetBytes Method

SQLiteDataReader.GetBytes Method
[image]

Retrieves a column as an array of bytes (blob)

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetBytes( _
ByVal i As Integer, _
ByVal fieldOffset As Long, _
ByVal buffer As Byte(), _
ByVal bufferoffset As Integer, _
ByVal length As Integer _
) As Long _
Implements IDataRecord.GetBytes
C#
public override long GetBytes(
int i,
long fieldOffset,
byte[] buffer,
int bufferoffset,
int length
)
C++
public:
virtual __int64 GetBytes(
int i,
__int64 fieldOffset,
array<char>^ buffer,
int bufferoffset,
int length
) override
J#
public override long GetBytes(
int i,
long fieldOffset,
byte[] buffer,
int bufferoffset,
int length
)
JScript
public override function GetBytes(
i : int,
fieldOffset : long,
buffer : Byte[],
bufferoffset : int,
length : int
) : long

Parameters

i
The index of the column to retrieve
fieldOffset
The zero-based index of where to begin reading the data
buffer
The buffer to write the bytes into
bufferoffset
The zero-based index of where to begin writing into the array
length
The number of bytes to retrieve

Return Value

The actual number of bytes written into the array

Implements

IDataRecord.GetBytes

Remarks

To determine the number of bytes in the column, pass a null value for the buffer. The total length will be returned.

See Also

SQLiteDataReader Class


GetChar Method

SQLiteDataReader.GetChar Method
[image]

Returns the column as a single character

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetChar( _
ByVal i As Integer _
) As Char _
Implements IDataRecord.GetChar
C#
public override char GetChar(
int i
)
C++
public:
virtual wchar_t GetChar(
int i
) override
J#
public override char GetChar(
int i
)
JScript
public override function GetChar(
i : int
) : char

Parameters

i
The index of the column to retrieve

Return Value

char

Implements

IDataRecord.GetChar

See Also

SQLiteDataReader Class


GetChars Method

SQLiteDataReader.GetChars Method
[image]

Retrieves a column as an array of chars (blob)

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetChars( _
ByVal i As Integer, _
ByVal fieldoffset As Long, _
ByVal buffer As Char(), _
ByVal bufferoffset As Integer, _
ByVal length As Integer _
) As Long _
Implements IDataRecord.GetChars
C#
public override long GetChars(
int i,
long fieldoffset,
char[] buffer,
int bufferoffset,
int length
)
C++
public:
virtual __int64 GetChars(
int i,
__int64 fieldoffset,
array<wchar_t>^ buffer,
int bufferoffset,
int length
) override
J#
public override long GetChars(
int i,
long fieldoffset,
char[] buffer,
int bufferoffset,
int length
)
JScript
public override function GetChars(
i : int,
fieldoffset : long,
buffer : char[],
bufferoffset : int,
length : int
) : long

Parameters

i
The index of the column to retrieve
fieldoffset
The zero-based index of where to begin reading the data
buffer
The buffer to write the characters into
bufferoffset
The zero-based index of where to begin writing into the array
length
The number of bytes to retrieve

Return Value

The actual number of characters written into the array

Implements

IDataRecord.GetChars

Remarks

To determine the number of characters in the column, pass a null value for the buffer. The total length will be returned.

See Also

SQLiteDataReader Class


GetDataTypeName Method

SQLiteDataReader.GetDataTypeName Method
[image]

Retrieves the name of the back-end datatype of the column

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetDataTypeName( _
ByVal i As Integer _
) As String _
Implements IDataRecord.GetDataTypeName
C#
public override string GetDataTypeName(
int i
)
C++
public:
virtual String GetDataTypeName(
int i
) override
J#
public override string GetDataTypeName(
int i
)
JScript
public override function GetDataTypeName(
i : int
) : String

Parameters

i
The index of the column to retrieve

Return Value

string

Implements

IDataRecord.GetDataTypeName

See Also

SQLiteDataReader Class


GetDateTime Method

SQLiteDataReader.GetDateTime Method
[image]

Retrieve the column as a date/time value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetDateTime( _
ByVal i As Integer _
) As Date _
Implements IDataRecord.GetDateTime
C#
public override DateTime GetDateTime(
int i
)
C++
public:
virtual DateTime GetDateTime(
int i
) override
J#
public override DateTime GetDateTime(
int i
)
JScript
public override function GetDateTime(
i : int
) : DateTime

Parameters

i
The index of the column to retrieve

Return Value

DateTime

Implements

IDataRecord.GetDateTime

See Also

SQLiteDataReader Class


GetDecimal Method

SQLiteDataReader.GetDecimal Method
[image]

Retrieve the column as a decimal value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetDecimal( _
ByVal i As Integer _
) As Decimal _
Implements IDataRecord.GetDecimal
C#
public override decimal GetDecimal(
int i
)
C++
public:
virtual decimal GetDecimal(
int i
) override
J#
public override decimal GetDecimal(
int i
)
JScript
public override function GetDecimal(
i : int
) : Decimal

Parameters

i
The index of the column to retrieve

Return Value

decimal

Implements

IDataRecord.GetDecimal

See Also

SQLiteDataReader Class


GetDouble Method

SQLiteDataReader.GetDouble Method
[image]

Returns the column as a double

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetDouble( _
ByVal i As Integer _
) As Double _
Implements IDataRecord.GetDouble
C#
public override double GetDouble(
int i
)
C++
public:
virtual double GetDouble(
int i
) override
J#
public override double GetDouble(
int i
)
JScript
public override function GetDouble(
i : int
) : double

Parameters

i
The index of the column to retrieve

Return Value

double

Implements

IDataRecord.GetDouble

See Also

SQLiteDataReader Class


GetEnumerator Method

SQLiteDataReader.GetEnumerator Method
[image]

Enumerator support

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
C#
public override IEnumerator GetEnumerator()
C++
public:
virtual IEnumerator GetEnumerator() override
J#
public override IEnumerator GetEnumerator()
JScript
public override function GetEnumerator() : IEnumerator

Return Value

Returns a DbEnumerator object.

Implements

IEnumerable.GetEnumerator

See Also

SQLiteDataReader Class


GetFieldType Method

SQLiteDataReader.GetFieldType Method
[image]

Returns the .NET type of a given column

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetFieldType( _
ByVal i As Integer _
) As Type _
Implements IDataRecord.GetFieldType
C#
public override Type GetFieldType(
int i
)
C++
public:
virtual Type GetFieldType(
int i
) override
J#
public override Type GetFieldType(
int i
)
JScript
public override function GetFieldType(
i : int
) : Type

Parameters

i
The index of the column to retrieve

Return Value

Type

Implements

IDataRecord.GetFieldType

See Also

SQLiteDataReader Class


GetFloat Method

SQLiteDataReader.GetFloat Method
[image]

Returns a column as a float value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetFloat( _
ByVal i As Integer _
) As Single _
Implements IDataRecord.GetFloat
C#
public override float GetFloat(
int i
)
C++
public:
virtual float GetFloat(
int i
) override
J#
public override float GetFloat(
int i
)
JScript
public override function GetFloat(
i : int
) : float

Parameters

i
The index of the column to retrieve

Return Value

float

Implements

IDataRecord.GetFloat

See Also

SQLiteDataReader Class


GetGuid Method

SQLiteDataReader.GetGuid Method
[image]

Returns the column as a Guid

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetGuid( _
ByVal i As Integer _
) As Guid _
Implements IDataRecord.GetGuid
C#
public override Guid GetGuid(
int i
)
C++
public:
virtual Guid GetGuid(
int i
) override
J#
public override Guid GetGuid(
int i
)
JScript
public override function GetGuid(
i : int
) : Guid

Parameters

i
The index of the column to retrieve

Return Value

Guid

Implements

IDataRecord.GetGuid

See Also

SQLiteDataReader Class


GetInt16 Method

SQLiteDataReader.GetInt16 Method
[image]

Returns the column as a short

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetInt16( _
ByVal i As Integer _
) As Short _
Implements IDataRecord.GetInt16
C#
public override short GetInt16(
int i
)
C++
public:
virtual short GetInt16(
int i
) override
J#
public override short GetInt16(
int i
)
JScript
public override function GetInt16(
i : int
) : short

Parameters

i
The index of the column to retrieve

Return Value

Int16

Implements

IDataRecord.GetInt16

See Also

SQLiteDataReader Class


GetInt32 Method

SQLiteDataReader.GetInt32 Method
[image]

Retrieves the column as an int

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetInt32( _
ByVal i As Integer _
) As Integer _
Implements IDataRecord.GetInt32
C#
public override int GetInt32(
int i
)
C++
public:
virtual int GetInt32(
int i
) override
J#
public override int GetInt32(
int i
)
JScript
public override function GetInt32(
i : int
) : int

Parameters

i
The index of the column to retrieve

Return Value

Int32

Implements

IDataRecord.GetInt32

See Also

SQLiteDataReader Class


GetInt64 Method

SQLiteDataReader.GetInt64 Method
[image]

Retrieves the column as a long

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetInt64( _
ByVal i As Integer _
) As Long _
Implements IDataRecord.GetInt64
C#
public override long GetInt64(
int i
)
C++
public:
virtual __int64 GetInt64(
int i
) override
J#
public override long GetInt64(
int i
)
JScript
public override function GetInt64(
i : int
) : long

Parameters

i
The index of the column to retrieve

Return Value

Int64

Implements

IDataRecord.GetInt64

See Also

SQLiteDataReader Class


GetName Method

SQLiteDataReader.GetName Method
[image]

Retrieves the name of the column

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetName( _
ByVal i As Integer _
) As String _
Implements IDataRecord.GetName
C#
public override string GetName(
int i
)
C++
public:
virtual String GetName(
int i
) override
J#
public override string GetName(
int i
)
JScript
public override function GetName(
i : int
) : String

Parameters

i
The index of the column to retrieve

Return Value

string

Implements

IDataRecord.GetName

See Also

SQLiteDataReader Class


GetOrdinal Method

SQLiteDataReader.GetOrdinal Method
[image]

Retrieves the i of a column, given its name

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetOrdinal( _
ByVal name As String _
) As Integer _
Implements IDataRecord.GetOrdinal
C#
public override int GetOrdinal(
string name
)
C++
public:
virtual int GetOrdinal(
String name
) override
J#
public override int GetOrdinal(
string name
)
JScript
public override function GetOrdinal(
name : String
) : int

Parameters

name
The name of the column to retrieve

Return Value

The int i of the column

Implements

IDataRecord.GetOrdinal

See Also

SQLiteDataReader Class


GetSchemaTable Method

SQLiteDataReader.GetSchemaTable Method
[image]

Schema information in SQLite is difficult to map into .NET conventions, so a lot of work must be done to gather the necessary information so it can be represented in an ADO.NET manner.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetSchemaTable() As DataTable _
Implements IDataReader.GetSchemaTable
C#
public override DataTable GetSchemaTable()
C++
public:
virtual DataTable GetSchemaTable() override
J#
public override DataTable GetSchemaTable()
JScript
public override function GetSchemaTable() : DataTable

Return Value

Returns a DataTable containing the schema information for the active SELECT statement being processed.

Implements

IDataReader.GetSchemaTable

See Also

SQLiteDataReader Class


GetString Method

SQLiteDataReader.GetString Method
[image]

Retrieves the column as a string

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetString( _
ByVal i As Integer _
) As String _
Implements IDataRecord.GetString
C#
public override string GetString(
int i
)
C++
public:
virtual String GetString(
int i
) override
J#
public override string GetString(
int i
)
JScript
public override function GetString(
i : int
) : String

Parameters

i
The index of the column to retrieve

Return Value

string

Implements

IDataRecord.GetString

See Also

SQLiteDataReader Class


GetValue Method

SQLiteDataReader.GetValue Method
[image]

Retrieves the column as an object corresponding to the underlying datatype of the column

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetValue( _
ByVal i As Integer _
) As Object _
Implements IDataRecord.GetValue
C#
public override object GetValue(
int i
)
C++
public:
virtual Object GetValue(
int i
) override
J#
public override object GetValue(
int i
)
JScript
public override function GetValue(
i : int
) : Object

Parameters

i
The index of the column to retrieve

Return Value

object

Implements

IDataRecord.GetValue

See Also

SQLiteDataReader Class


GetValues Method

SQLiteDataReader.GetValues Method
[image]

Retreives the values of multiple columns, up to the size of the supplied array

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetValues( _
ByVal values As Object() _
) As Integer _
Implements IDataRecord.GetValues
C#
public override int GetValues(
object[] values
)
C++
public:
virtual int GetValues(
array<Object>^ values
) override
J#
public override int GetValues(
object[] values
)
JScript
public override function GetValues(
values : Object[]
) : int

Parameters

values
The array to fill with values from the columns in the current resultset

Return Value

The number of columns retrieved

Implements

IDataRecord.GetValues

See Also

SQLiteDataReader Class


IsDBNull Method

SQLiteDataReader.IsDBNull Method
[image]

Returns True if the specified column is null

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function IsDBNull( _
ByVal i As Integer _
) As Boolean _
Implements IDataRecord.IsDBNull
C#
public override bool IsDBNull(
int i
)
C++
public:
virtual bool IsDBNull(
int i
) override
J#
public override bool IsDBNull(
int i
)
JScript
public override function IsDBNull(
i : int
) : bool

Parameters

i
The index of the column to retrieve

Return Value

True or False

Implements

IDataRecord.IsDBNull

See Also

SQLiteDataReader Class


NextResult Method

SQLiteDataReader.NextResult Method
[image]

Moves to the next resultset in multiple row-returning SQL command.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function NextResult() As Boolean _
Implements IDataReader.NextResult
C#
public override bool NextResult()
C++
public:
virtual bool NextResult() override
J#
public override bool NextResult()
JScript
public override function NextResult() : bool

Return Value

True if the command was successful and a new resultset is available, False otherwise.

Implements

IDataReader.NextResult

See Also

SQLiteDataReader Class


Read Method

SQLiteDataReader.Read Method
[image]

Reads the next row from the resultset

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function Read() As Boolean _
Implements IDataReader.Read
C#
public override bool Read()
C++
public:
virtual bool Read() override
J#
public override bool Read()
JScript
public override function Read() : bool

Return Value

True if a new row was successfully loaded and is ready for processing

Implements

IDataReader.Read

See Also

SQLiteDataReader Class


SQLiteDateFormats Enumeration

SQLiteDateFormats Enumeration
[image]

This implementation of SQLite for ADO.NET can process date/time fields in databases in only one of two formats. Ticks and ISO8601. Ticks is inherently more accurate, but less compatible with 3rd party tools that query the database, and renders the DateTime field unreadable without post-processing. ISO8601 is more compatible, readable, fully-processable, but less accurate as it doesn't provide time down to fractions of a second.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Enum SQLiteDateFormats
C#
public enum SQLiteDateFormats
C++
public enum class SQLiteDateFormats
J#
public enum SQLiteDateFormats
JScript
public enum SQLiteDateFormats

Members

Member Name | Description
Ticks | Using ticks is more accurate but less compatible with other viewers and utilities that access your database.
ISO8601 | The default format for this provider.
JulianDay | JulianDay format, which is what SQLite uses internally

See Also


SQLiteErrorCode Enumeration

SQLiteErrorCode Enumeration
[image]

SQLite error codes

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Enum SQLiteErrorCode
C#
public enum SQLiteErrorCode
C++
public enum class SQLiteErrorCode
J#
public enum SQLiteErrorCode
JScript
public enum SQLiteErrorCode

Members

Member Name | Description
Ok | Success
Error | SQL error or missing database
Internal | Internal logic error in SQLite
Perm | Access permission denied
Abort | Callback routine requested an abort
Busy | The database file is locked
Locked | A table in the database is locked
NoMem | malloc() failed
ReadOnly | Attempt to write a read-only database
Interrupt | Operation terminated by sqlite3_interrupt()
IOErr | Some kind of disk I/O error occurred
Corrupt | The database disk image is malformed
NotFound | Table or record not found
Full | Insertion failed because database is full
CantOpen | Unable to open the database file
Protocol | Database lock protocol error
Empty | Database is empty
Schema | The database schema changed
TooBig | Too much data for one row of a table
Constraint | Abort due to constraint violation
Mismatch | Data type mismatch
Misuse | Library used incorrectly
NOLFS | Uses OS features not supported on host
Auth | Authorization denied
Format | Auxiliary database format error
Range | 2nd parameter to sqlite3_bind out of range
NotADatabase | File opened that is not a database file
Row | sqlite3_step() has another row ready
Done | sqlite3_step() has finished executing

See Also


SQLiteException Class

SQLiteException Class
See Also Example Members
[image]

SQLite exception class. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteException
Inherits DbException
C#
public sealed class SQLiteException : DbException
C++
ref class SQLiteException sealed : DbException
J#
public final class SQLiteException extends DbException
JScript
public final class SQLiteException extends DbException

Inheritance Hierarchy

System.Object
System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
System.Data.Common.DbException
System.Data.SQLite.SQLiteException

See Also

SQLiteException Members


SQLiteException Members

SQLiteException Members
See Also Example Properties Methods Explicit Inteface Implementations
[image]

SQLite exception class. This class cannot be inherited.

The following tables list the members exposed by SQLiteException.

Public Constructors

Name | Description
SQLiteException | Overloaded.
Top

Public Properties

 | Name | Description
Public property | Data | Gets a collection of key/value pairs that provide additional, user-defined information about the exception. (inherited from Exception)
Public property | ErrorCode | Retrieves the underlying SQLite error code for this exception
Public property | HelpLink | Gets or sets a link to the help file associated with this exception. (inherited from Exception)
Public property | InnerException | Gets the Exception instance that caused the current exception. (inherited from Exception)
Public property | Message | Gets a message that describes the current exception. (inherited from Exception)
Public property | Source | Gets or sets the name of the application or the object that causes the error. (inherited from Exception)
Public property | StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (inherited from Exception)
Public property | TargetSite | Gets the method that throws the current exception. (inherited from Exception)
Top

Public Methods

 | Name | Description
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetBaseException | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (inherited from Exception)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetObjectData | When overridden in a derived class, sets the SerializationInfo with information about the exception. (inherited from Exception)
Public method | GetType | Gets the runtime type of the current instance. (inherited from Exception)
Public method | ToString | Creates and returns a string representation of the current exception. (inherited from Exception)
Top

Explicit Interface Implementations

Name | Description
SQLiteException | Overloaded.
Top

See Also

SQLiteException Class


SQLiteException Constructor

SQLiteException Constructor

Overload List

 | Name | Description
Public method | SQLiteException | Various public constructors that just pass along to the base Exception
Public method | SQLiteException (Int32, String) | Public constructor for generating a SQLite error given the base error code
Public method | SQLiteException (String) | Various public constructors that just pass along to the base Exception
Public method | SQLiteException (String, Exception) | Various public constructors that just pass along to the base Exception Passed to ExceptionPassed to Exception

See Also

SQLiteException Class


SQLiteException Constructor ()

SQLiteException Constructor ()
See Also Example
[image]

Various public constructors that just pass along to the base Exception

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteException()
C++
public:
SQLiteException() sealed
J#
public SQLiteException()
JScript
public function SQLiteException()

See Also

SQLiteException Class
SQLiteException Constructor Overload List


SQLiteException Constructor (Int32, String)

SQLiteException Constructor (Int32, String)
See Also Example
[image]

Public constructor for generating a SQLite error given the base error code

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal errorCode As Integer, _
ByVal extendedInformation As String _
)
C#
public SQLiteException(
int errorCode,
string extendedInformation
)
C++
public:
SQLiteException(
int errorCode,
String extendedInformation
) sealed
J#
public SQLiteException(
int errorCode,
string extendedInformation
)
JScript
public function SQLiteException(
errorCode : int,
extendedInformation : String
)

Parameters

errorCode
The SQLite error code to report
extendedInformation
Extra text to go along with the error message text

See Also

SQLiteException Class
SQLiteException Constructor Overload List


SQLiteException Constructor (String)

SQLiteException Constructor (String)
See Also Example
[image]

Various public constructors that just pass along to the base Exception

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal message As String _
)
C#
public SQLiteException(
string message
)
C++
public:
SQLiteException(
String message
) sealed
J#
public SQLiteException(
string message
)
JScript
public function SQLiteException(
message : String
)

Parameters

message
Passed verbatim to Exception

See Also

SQLiteException Class
SQLiteException Constructor Overload List


SQLiteException Constructor (String, Exception)

SQLiteException Constructor (String, Exception)
See Also Example
[image]

Various public constructors that just pass along to the base Exception Passed to ExceptionPassed to Exception

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal message As String, _
ByVal innerException As Exception _
)
C#
public SQLiteException(
string message,
Exception innerException
)
C++
public:
SQLiteException(
String message,
Exception innerException
) sealed
J#
public SQLiteException(
string message,
Exception innerException
)
JScript
public function SQLiteException(
message : String,
innerException : Exception
)

See Also

SQLiteException Class
SQLiteException Constructor Overload List


Properties

SQLiteException Properties
[image]

Public Properties

 | Name | Description
Public property | Data | Gets a collection of key/value pairs that provide additional, user-defined information about the exception. (inherited from Exception)
Public property | ErrorCode | Retrieves the underlying SQLite error code for this exception
Public property | HelpLink | Gets or sets a link to the help file associated with this exception. (inherited from Exception)
Public property | InnerException | Gets the Exception instance that caused the current exception. (inherited from Exception)
Public property | Message | Gets a message that describes the current exception. (inherited from Exception)
Public property | Source | Gets or sets the name of the application or the object that causes the error. (inherited from Exception)
Public property | StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (inherited from Exception)
Public property | TargetSite | Gets the method that throws the current exception. (inherited from Exception)
Top

See Also

SQLiteException Class


ErrorCode Property

SQLiteException.ErrorCode Property
[image]

Retrieves the underlying SQLite error code for this exception

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows ReadOnly Property ErrorCode As SQLiteErrorCode
C#
public new SQLiteErrorCode ErrorCode { get; }
C++
public new property SQLiteErrorCode ErrorCode sealed {
SQLiteErrorCode get();
}
J#
/** property */
public SQLiteErrorCode get_ErrorCode();
JScript
public function get ErrorCode() : SQLiteErrorCode

See Also

SQLiteException Class


SQLiteFactory Class

SQLiteFactory Class
See Also Example Members
[image]

SQLite implementation of DbProviderFactory. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteFactory
Inherits DbProviderFactory
Implements IServiceProvider
C#
public sealed class SQLiteFactory : DbProviderFactory, IServiceProvider
C++
ref class SQLiteFactory sealed : DbProviderFactory, IServiceProvider
J#
public final class SQLiteFactory extends DbProviderFactory implements IServiceProvider
JScript
public final class SQLiteFactory extends DbProviderFactory, IServiceProvider

Inheritance Hierarchy

System.Object
System.Data.Common.DbProviderFactory
System.Data.SQLite.SQLiteFactory

See Also

SQLiteFactory Members


SQLiteFactory Members

SQLiteFactory Members
See Also Example Constructors Fields Properties Methods
[image]

SQLite implementation of DbProviderFactory. This class cannot be inherited.

The following tables list the members exposed by SQLiteFactory.

Public Constructors

 | Name | Description
Public method | SQLiteFactory | Initializes a new instance of the SQLiteFactory class.
Top

Public Fields

Name | Description
Instance | Static instance member which returns an instanced SQLiteFactory class. This field is read-only.
Top

Public Properties

 | Name | Description
Public property | CanCreateDataSourceEnumerator | Specifies whether the specific DbProviderFactory supports the DbDataSourceEnumerator class. (inherited from DbProviderFactory)
Top

Public Methods

 | Name | Description
Public method | CreateCommand | Overridden. Returns a new SQLiteCommand object.
Public method | CreateCommandBuilder | Overridden. Returns a new SQLiteCommandBuilder object.
Public method | CreateConnection | Overridden. Creates a new SQLiteConnection.
Public method | CreateConnectionStringBuilder | Overridden. Creates a new SQLiteConnectionStringBuilder.
Public method | CreateDataAdapter | Overridden. Creates a new SQLiteDataAdapter.
Public method | CreateDataSourceEnumerator | Returns a new instance of the provider's class that implements the DbDataSourceEnumerator class. (inherited from DbProviderFactory)
Public method | CreateParameter | Overridden. Creates a new SQLiteParameter.
Public method | CreatePermission | Returns a new instance of the provider's class that implements the provider's version of the CodeAccessPermission class. (inherited from DbProviderFactory)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteFactory Class


SQLiteFactory Constructor

SQLiteFactory Constructor
[image]

Initializes a new instance of the SQLiteFactory class.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteFactory()
C++
public:
SQLiteFactory() sealed
J#
public SQLiteFactory()
JScript
public function SQLiteFactory()

See Also

SQLiteFactory Class


Fields

SQLiteFactory Fields
[image]

Public Fields

Name | Description
Instance | Static instance member which returns an instanced SQLiteFactory class. This field is read-only.
Top

See Also

SQLiteFactory Class


Instance Field

SQLiteFactory.Instance Field
[image]

Static instance member which returns an instanced SQLiteFactory class. This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly Instance As SQLiteFactory
C#
public static readonly SQLiteFactory Instance;
C++
public:
static const SQLiteFactory Instance;
J#
public static final SQLiteFactory Instance
JScript
public static const var Instance : SQLiteFactory;

See Also

SQLiteFactory Class


Methods

SQLiteFactory Methods
[image]

Public Methods

 | Name | Description
Public method | CreateCommand | Overridden. Returns a new SQLiteCommand object.
Public method | CreateCommandBuilder | Overridden. Returns a new SQLiteCommandBuilder object.
Public method | CreateConnection | Overridden. Creates a new SQLiteConnection.
Public method | CreateConnectionStringBuilder | Overridden. Creates a new SQLiteConnectionStringBuilder.
Public method | CreateDataAdapter | Overridden. Creates a new SQLiteDataAdapter.
Public method | CreateDataSourceEnumerator | Returns a new instance of the provider's class that implements the DbDataSourceEnumerator class. (inherited from DbProviderFactory)
Public method | CreateParameter | Overridden. Creates a new SQLiteParameter.
Public method | CreatePermission | Returns a new instance of the provider's class that implements the provider's version of the CodeAccessPermission class. (inherited from DbProviderFactory)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteFactory Class


CreateCommand Method

SQLiteFactory.CreateCommand Method
[image]

Returns a new SQLiteCommand object.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function CreateCommand() As DbCommand
C#
public override DbCommand CreateCommand()
C++
public:
virtual DbCommand CreateCommand() override
J#
public override DbCommand CreateCommand()
JScript
public override function CreateCommand() : DbCommand

Return Value

A SQLiteCommand object.

See Also

SQLiteFactory Class


CreateCommandBuilder Method

SQLiteFactory.CreateCommandBuilder Method
[image]

Returns a new SQLiteCommandBuilder object.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function CreateCommandBuilder() As DbCommandBuilder
C#
public override DbCommandBuilder CreateCommandBuilder()
C++
public:
virtual DbCommandBuilder CreateCommandBuilder() override
J#
public override DbCommandBuilder CreateCommandBuilder()
JScript
public override function CreateCommandBuilder() : DbCommandBuilder

Return Value

A SQLiteCommandBuilder object.

See Also

SQLiteFactory Class


CreateConnection Method

SQLiteFactory.CreateConnection Method
[image]

Creates a new SQLiteConnection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function CreateConnection() As DbConnection
C#
public override DbConnection CreateConnection()
C++
public:
virtual DbConnection CreateConnection() override
J#
public override DbConnection CreateConnection()
JScript
public override function CreateConnection() : DbConnection

Return Value

A SQLiteConnection object.

See Also

SQLiteFactory Class


CreateConnectionStringBuilder Method

SQLiteFactory.CreateConnectionStringBuilder Method
[image]

Creates a new SQLiteConnectionStringBuilder.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function CreateConnectionStringBuilder() As DbConnectionStringBuilder
C#
public override DbConnectionStringBuilder CreateConnectionStringBuilder()
C++
public:
virtual DbConnectionStringBuilder CreateConnectionStringBuilder() override
J#
public override DbConnectionStringBuilder CreateConnectionStringBuilder()
JScript
public override function CreateConnectionStringBuilder() : DbConnectionStringBuilder

Return Value

A SQLiteConnectionStringBuilder object.

See Also

SQLiteFactory Class


CreateDataAdapter Method

SQLiteFactory.CreateDataAdapter Method
[image]

Creates a new SQLiteDataAdapter.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function CreateDataAdapter() As DbDataAdapter
C#
public override DbDataAdapter CreateDataAdapter()
C++
public:
virtual DbDataAdapter CreateDataAdapter() override
J#
public override DbDataAdapter CreateDataAdapter()
JScript
public override function CreateDataAdapter() : DbDataAdapter

Return Value

A SQLiteDataAdapter object.

See Also

SQLiteFactory Class


CreateParameter Method

SQLiteFactory.CreateParameter Method
[image]

Creates a new SQLiteParameter.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function CreateParameter() As DbParameter
C#
public override DbParameter CreateParameter()
C++
public:
virtual DbParameter CreateParameter() override
J#
public override DbParameter CreateParameter()
JScript
public override function CreateParameter() : DbParameter

Return Value

A SQLiteParameter object.

See Also

SQLiteFactory Class


SQLiteFunction Class

SQLiteFunction Class
See Also Example Members
[image]

This abstract class is designed to handle user-defined functions easily. An instance of the derived class is made for each connection to the database. This class is abstract (MustInherit in Visual Basic)abstractMustInherit and so cannot be instantiated.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public MustInherit Class SQLiteFunction
Implements IDisposable
C#
public abstract class SQLiteFunction : IDisposable
C++
ref class SQLiteFunction abstract : IDisposable
J#
public class SQLiteFunction implements IDisposable
JScript
public class SQLiteFunction extends IDisposable

Remarks

Although there is one instance of a class derived from SQLiteFunction per database connection, the derived class has no access to the underlying connection. This is necessary to deter implementers from thinking it would be a good idea to make database calls during processing. It is important to distinguish between a per-connection instance, and a per-SQL statement context. One instance of this class services all SQL statements being stepped through on that connection, and there can be many. One should never store per-statement information in member variables of user-defined function classes. For aggregate functions, always create and store your per-statement data in the contextData object on the 1st step. This data will be automatically freed for you (and Dispose() called if the item supports IDisposable) when the statement completes.

Inheritance Hierarchy

System.Object
System.Data.SQLite.SQLiteFunction

See Also

SQLiteFunction Members


SQLiteFunction Members

SQLiteFunction Members
See Also Example Constructors Properties Methods
[image]

This abstract class is designed to handle user-defined functions easily. An instance of the derived class is made for each connection to the database. This class is abstract (MustInherit in Visual Basic)abstractMustInherit and so cannot be instantiated.

The following tables list the members exposed by SQLiteFunction.

Protected Constructors

 | Name | Description
Family method | SQLiteFunction | Internal constructor, initializes the function's internal variables.
Top

Public Properties

 | Name | Description
Public property | SQLiteConvert | Returns a reference to the underlying connection's SQLiteConvert class, which can be used to convert strings and DateTime's into the current connection's encoding schema.
Top

Public Methods

 | Name | Description
Public method | Compare | User-defined collation sequences override this method to provide a custom string sorting algorithm.
Public method | Dispose | Overloaded. Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if someone closes the connection while a DataReader is open.
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | Final | Aggregate functions override this method to finish their aggregate processing.
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | Invoke | Scalar functions override this method to do their magic.
 | RegisterFunction | Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported.
Public method | Step | Aggregate functions override this method to do their magic.
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

Protected Methods

 | Name | Description
Family method | Dispose | Overloaded. Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if someone closes the connection while a DataReader is open.
Family method | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method | MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object)
Top

See Also

SQLiteFunction Class


SQLiteFunction Constructor

SQLiteFunction Constructor
[image]

Internal constructor, initializes the function's internal variables.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Protected Sub New()
C#
protected SQLiteFunction()
C++
protected:
SQLiteFunction() sealed
J#
protected SQLiteFunction()
JScript
protected function SQLiteFunction()

See Also

SQLiteFunction Class


Properties

SQLiteFunction Properties
[image]

Public Properties

 | Name | Description
Public property | SQLiteConvert | Returns a reference to the underlying connection's SQLiteConvert class, which can be used to convert strings and DateTime's into the current connection's encoding schema.
Top

See Also

SQLiteFunction Class


SQLiteConvert Property

SQLiteFunction.SQLiteConvert Property
[image]

Returns a reference to the underlying connection's SQLiteConvert class, which can be used to convert strings and DateTime's into the current connection's encoding schema.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public ReadOnly Property SQLiteConvert As SQLiteConvert
C#
public SQLiteConvert SQLiteConvert { get; }
C++
public property SQLiteConvert SQLiteConvert sealed {
SQLiteConvert get();
}
J#
/** property */
public SQLiteConvert get_SQLiteConvert();
JScript
public function get SQLiteConvert() : SQLiteConvert

See Also

SQLiteFunction Class


Methods

SQLiteFunction Methods
[image]

Public Methods

 | Name | Description
Public method | Compare | User-defined collation sequences override this method to provide a custom string sorting algorithm.
Public method | Dispose | Overloaded. Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if someone closes the connection while a DataReader is open.
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | Final | Aggregate functions override this method to finish their aggregate processing.
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | Invoke | Scalar functions override this method to do their magic.
 | RegisterFunction | Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported.
Public method | Step | Aggregate functions override this method to do their magic.
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

Protected Methods

 | Name | Description
Family method | Dispose | Overloaded. Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if someone closes the connection while a DataReader is open.
Family method | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method | MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object)
Top

See Also

SQLiteFunction Class


Compare Method

SQLiteFunction.Compare Method
[image]

User-defined collation sequences override this method to provide a custom string sorting algorithm.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overridable Function Compare( _
ByVal param1 As String, _
ByVal param2 As String _
) As Integer
C#
public virtual int Compare(
string param1,
string param2
)
C++
public:
virtual int Compare(
String param1,
String param2
)
J#
public virtual int Compare(
string param1,
string param2
)
JScript
public virtual function Compare(
param1 : String,
param2 : String
) : int

Parameters

param1
The first string to compare
param2
The second strnig to compare

Return Value

1 if param1 is greater than param2, 0 if they are equal, or -1 if param1 is less than param2

See Also

SQLiteFunction Class


Dispose Method

SQLiteFunction.Dispose Method

Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if someone closes the connection while a DataReader is open.

Overload List

 | Name | Description
Public method | Dispose | Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if someone closes the connection while a DataReader is open.
Family method | Dispose (Boolean) | Placeholder for a user-defined disposal routine

See Also

SQLiteFunction Class


Dispose Method ()

SQLiteFunction.Dispose Method ()
See Also Example
[image]

Disposes of any active contextData variables that were not automatically cleaned up. Sometimes this can happen if someone closes the connection while a DataReader is open.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub Dispose() _
Implements IDisposable.Dispose
C#
public void Dispose()
C++
public:
void Dispose() sealed
J#
public void Dispose()
JScript
public function Dispose()

Implements

IDisposable.Dispose

See Also

SQLiteFunction Class
SQLiteFunction.Dispose Overload List


Dispose Method (Boolean)

SQLiteFunction.Dispose Method (Boolean)
See Also Example
[image]

Placeholder for a user-defined disposal routine

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Protected Overridable Sub Dispose( _
ByVal disposing As Boolean _
)
C#
protected virtual void Dispose(
bool disposing
)
C++
protected:
virtual void Dispose(
bool disposing
)
J#
protected virtual void Dispose(
bool disposing
)
JScript
protected virtual function Dispose(
disposing : bool
)

Parameters

disposing
True if the object is being disposed explicitly

See Also

SQLiteFunction Class
SQLiteFunction.Dispose Overload List


Final Method

SQLiteFunction.Final Method
[image]

Aggregate functions override this method to finish their aggregate processing.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overridable Function Final( _
ByVal contextData As Object _
) As Object
C#
public virtual object Final(
object contextData
)
C++
public:
virtual Object Final(
Object contextData
)
J#
public virtual object Final(
object contextData
)
JScript
public virtual function Final(
contextData : Object
) : Object

Parameters

contextData
Your own assigned contextData, provided for you so you can return your final results.

Return Value

You may return most simple types as a return value, null or DBNull.Value to return null, DateTime, or you may return an Exception-derived class if you wish to return an error to SQLite. Do not actually throw the error, just return it!

Remarks

If you implemented your aggregate function properly, you've been recording and keeping track of your data in the contextData object provided, and now at this stage you should have all the information you need in there to figure out what to return. NOTE: It is possible to arrive here without receiving a previous call to Step(), in which case the contextData will be null. This can happen when no rows were returned. You can either return null, or 0 or some other custom return value if that is the case.

See Also

SQLiteFunction Class


Invoke Method

SQLiteFunction.Invoke Method
[image]

Scalar functions override this method to do their magic.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overridable Function Invoke( _
ByVal args As Object() _
) As Object
C#
public virtual object Invoke(
object[] args
)
C++
public:
virtual Object Invoke(
array<Object>^ args
)
J#
public virtual object Invoke(
object[] args
)
JScript
public virtual function Invoke(
args : Object[]
) : Object

Parameters

args
The arguments for the command to process

Return Value

You may return most simple types as a return value, null or DBNull.Value to return null, DateTime, or you may return an Exception-derived class if you wish to return an error to SQLite. Do not actually throw the error, just return it!

Remarks

Parameters passed to functions have only an affinity for a certain data type, there is no underlying schema available to force them into a certain type. Therefore the only types you will ever see as parameters are DBNull.Value, Int64, Double, String or byte[] array.

See Also

SQLiteFunction Class


RegisterFunction Method

SQLiteFunction.RegisterFunction Method
[image]

Manual method of registering a function. The type must still have the SQLiteFunctionAttributes in order to work properly, but this is a workaround for the Compact Framework where enumerating assemblies is not currently supported.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared Sub RegisterFunction( _
ByVal typ As Type _
)
C#
public static void RegisterFunction(
Type typ
)
C++
public:
static void RegisterFunction(
Type typ
)
J#
public static void RegisterFunction(
Type typ
)
JScript
public static function RegisterFunction(
typ : Type
)

Parameters

typ
The type of the function to register

See Also

SQLiteFunction Class


Step Method

SQLiteFunction.Step Method
[image]

Aggregate functions override this method to do their magic.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overridable Sub Step( _
ByVal args As Object(), _
ByVal stepNumber As Integer, _
ByRef contextData As Object _
)
C#
public virtual void Step(
object[] args,
int stepNumber,
ref object contextData
)
C++
public:
virtual void Step(
array<Object>^ args,
int stepNumber,
Object% contextData
)
J#
public virtual void Step(
object[] args,
int stepNumber,
object contextData
)
JScript
public virtual function Step(
args : Object[],
stepNumber : int,
contextData : Object
)

Parameters

args
The arguments for the command to process
stepNumber
The 1-based step number. This is incrememted each time the step method is called.
contextData
A placeholder for implementers to store contextual data pertaining to the current context.

Remarks

Typically you'll be updating whatever you've placed in the contextData field and returning as quickly as possible.

See Also

SQLiteFunction Class


SQLiteFunctionAttribute Class

SQLiteFunctionAttribute Class
See Also Example Members
[image]

A simple custom attribute to enable us to easily find user-defined functions in the loaded assemblies and initialize them in SQLite as connections are made. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteFunctionAttribute
Inherits Attribute
C#
public sealed class SQLiteFunctionAttribute : Attribute
C++
ref class SQLiteFunctionAttribute sealed : Attribute
J#
public final class SQLiteFunctionAttribute extends Attribute
JScript
public final class SQLiteFunctionAttribute extends Attribute

Inheritance Hierarchy

System.Object
System.Attribute
System.Data.SQLite.SQLiteFunctionAttribute

See Also

SQLiteFunctionAttribute Members


SQLiteFunctionAttribute Members

SQLiteFunctionAttribute Members
See Also Example Constructors Properties Methods
[image]

A simple custom attribute to enable us to easily find user-defined functions in the loaded assemblies and initialize them in SQLite as connections are made. This class cannot be inherited.

The following tables list the members exposed by SQLiteFunctionAttribute.

Public Constructors

 | Name | Description
Public method | SQLiteFunctionAttribute | Default constructor, initializes the internal variables for the function.
Top

Public Properties

 | Name | Description
Public property | Arguments | The number of arguments this function expects. -1 if the number of arguments is variable.
Public property | FuncType | The type of function this implementation will be.
Public property | Name | The function's name as it will be used in SQLite command text.
Public property | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (inherited from Attribute)
Top

Public Methods

 | Name | Description
Public method | Equals | Returns a value that indicates whether this instance is equal to a specified object. (inherited from Attribute)
Public method | GetHashCode | Returns the hash code for this instance. (inherited from Attribute)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | IsDefaultAttribute | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (inherited from Attribute)
Public method | Match | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (inherited from Attribute)
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteFunctionAttribute Class


SQLiteFunctionAttribute Constructor

SQLiteFunctionAttribute Constructor
[image]

Default constructor, initializes the internal variables for the function.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteFunctionAttribute()
C++
public:
SQLiteFunctionAttribute() sealed
J#
public SQLiteFunctionAttribute()
JScript
public function SQLiteFunctionAttribute()

See Also

SQLiteFunctionAttribute Class


Properties

SQLiteFunctionAttribute Properties
[image]

Public Properties

 | Name | Description
Public property | Arguments | The number of arguments this function expects. -1 if the number of arguments is variable.
Public property | FuncType | The type of function this implementation will be.
Public property | Name | The function's name as it will be used in SQLite command text.
Public property | TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (inherited from Attribute)
Top

See Also

SQLiteFunctionAttribute Class


Arguments Property

SQLiteFunctionAttribute.Arguments Property
[image]

The number of arguments this function expects. -1 if the number of arguments is variable.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property Arguments As Integer
C#
public int Arguments { get; set; }
C++
public property int Arguments sealed {
int get();
void set(int value);
}
J#
/** property */
public int get_Arguments();

/** property */
public void set_Arguments(int value);
JScript
public function get Arguments() : int

public function set Arguments(value : int);

See Also

SQLiteFunctionAttribute Class


FuncType Property

SQLiteFunctionAttribute.FuncType Property
[image]

The type of function this implementation will be.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property FuncType As FunctionType
C#
public FunctionType FuncType { get; set; }
C++
public property FunctionType FuncType sealed {
FunctionType get();
void set(FunctionType value);
}
J#
/** property */
public FunctionType get_FuncType();

/** property */
public void set_FuncType(FunctionType value);
JScript
public function get FuncType() : FunctionType

public function set FuncType(value : FunctionType);

See Also

SQLiteFunctionAttribute Class


Name Property

SQLiteFunctionAttribute.Name Property
[image]

The function's name as it will be used in SQLite command text.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Property Name As String
C#
public string Name { get; set; }
C++
public property string Name sealed {
String get();
void set(String value);
}
J#
/** property */
public string get_Name();

/** property */
public void set_Name(string value);
JScript
public function get Name() : String

public function set Name(value : String);

See Also

SQLiteFunctionAttribute Class


SQLiteMetaDataCollectionNames Class

SQLiteMetaDataCollectionNames Class
See Also Example Members
[image]

MetaDataCollections specific to SQLite This is a static class (Module in Visual Basic)static classModule and so cannot be inherited or instantiated.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Module SQLiteMetaDataCollectionNames
C#
public static class SQLiteMetaDataCollectionNames
C++
ref class SQLiteMetaDataCollectionNames abstract sealed
J#
public final class SQLiteMetaDataCollectionNames
JScript
public class SQLiteMetaDataCollectionNames

Inheritance Hierarchy

System.Object
System.Data.SQLite.SQLiteMetaDataCollectionNames

See Also

SQLiteMetaDataCollectionNames Members


SQLiteMetaDataCollectionNames Members

SQLiteMetaDataCollectionNames Members
See Also Example Fields
[image]

MetaDataCollections specific to SQLite This is a static class (Module in Visual Basic)static classModule and so cannot be inherited or instantiated.

The following tables list the members exposed by SQLiteMetaDataCollectionNames.

Public Fields

Name | Description
Catalogs | Returns a list of databases attached to the connection This field is read-only.
Columns | Returns column information for the specified table This field is read-only.
ForeignKeys | Returns foreign key information for the given catalog This field is read-only.
IndexColumns | Returns base columns for the given index This field is read-only.
Indexes | Returns index information for the optionally-specified table This field is read-only.
Tables | Returns the tables in the given catalog This field is read-only.
ViewColumns | Returns underlying column information on the given view This field is read-only.
Views | Returns user-defined views in the given catalog This field is read-only.
Top

See Also

SQLiteMetaDataCollectionNames Class


Fields

SQLiteMetaDataCollectionNames Fields
[image]

Public Fields

Name | Description
Catalogs | Returns a list of databases attached to the connection This field is read-only.
Columns | Returns column information for the specified table This field is read-only.
ForeignKeys | Returns foreign key information for the given catalog This field is read-only.
IndexColumns | Returns base columns for the given index This field is read-only.
Indexes | Returns index information for the optionally-specified table This field is read-only.
Tables | Returns the tables in the given catalog This field is read-only.
ViewColumns | Returns underlying column information on the given view This field is read-only.
Views | Returns user-defined views in the given catalog This field is read-only.
Top

See Also

SQLiteMetaDataCollectionNames Class


Catalogs Field

SQLiteMetaDataCollectionNames.Catalogs Field
[image]

Returns a list of databases attached to the connection This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly Catalogs As String
C#
public static readonly string Catalogs;
C++
public:
static const String Catalogs;
J#
public static final string Catalogs
JScript
public static const var Catalogs : String;

See Also

SQLiteMetaDataCollectionNames Class


Columns Field

SQLiteMetaDataCollectionNames.Columns Field
[image]

Returns column information for the specified table This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly Columns As String
C#
public static readonly string Columns;
C++
public:
static const String Columns;
J#
public static final string Columns
JScript
public static const var Columns : String;

See Also

SQLiteMetaDataCollectionNames Class


ForeignKeys Field

SQLiteMetaDataCollectionNames.ForeignKeys Field
[image]

Returns foreign key information for the given catalog This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly ForeignKeys As String
C#
public static readonly string ForeignKeys;
C++
public:
static const String ForeignKeys;
J#
public static final string ForeignKeys
JScript
public static const var ForeignKeys : String;

See Also

SQLiteMetaDataCollectionNames Class


IndexColumns Field

SQLiteMetaDataCollectionNames.IndexColumns Field
[image]

Returns base columns for the given index This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly IndexColumns As String
C#
public static readonly string IndexColumns;
C++
public:
static const String IndexColumns;
J#
public static final string IndexColumns
JScript
public static const var IndexColumns : String;

See Also

SQLiteMetaDataCollectionNames Class


Indexes Field

SQLiteMetaDataCollectionNames.Indexes Field
[image]

Returns index information for the optionally-specified table This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly Indexes As String
C#
public static readonly string Indexes;
C++
public:
static const String Indexes;
J#
public static final string Indexes
JScript
public static const var Indexes : String;

See Also

SQLiteMetaDataCollectionNames Class


Tables Field

SQLiteMetaDataCollectionNames.Tables Field
[image]

Returns the tables in the given catalog This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly Tables As String
C#
public static readonly string Tables;
C++
public:
static const String Tables;
J#
public static final string Tables
JScript
public static const var Tables : String;

See Also

SQLiteMetaDataCollectionNames Class


ViewColumns Field

SQLiteMetaDataCollectionNames.ViewColumns Field
[image]

Returns underlying column information on the given view This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly ViewColumns As String
C#
public static readonly string ViewColumns;
C++
public:
static const String ViewColumns;
J#
public static final string ViewColumns
JScript
public static const var ViewColumns : String;

See Also

SQLiteMetaDataCollectionNames Class


Views Field

SQLiteMetaDataCollectionNames.Views Field
[image]

Returns user-defined views in the given catalog This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shared ReadOnly Views As String
C#
public static readonly string Views;
C++
public:
static const String Views;
J#
public static final string Views
JScript
public static const var Views : String;

See Also

SQLiteMetaDataCollectionNames Class


SQLiteParameter Class

SQLiteParameter Class
See Also Example Members
[image]

SQLite implementation of DbParameter. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteParameter
Inherits DbParameter
Implements ICloneable
C#
public sealed class SQLiteParameter : DbParameter, ICloneable
C++
ref class SQLiteParameter sealed : DbParameter, ICloneable
J#
public final class SQLiteParameter extends DbParameter implements ICloneable
JScript
public final class SQLiteParameter extends DbParameter, ICloneable

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbParameter
System.Data.SQLite.SQLiteParameter

See Also

SQLiteParameter Members


SQLiteParameter Members

SQLiteParameter Members
See Also Example Properties Methods Explicit Inteface Implementations
[image]

SQLite implementation of DbParameter. This class cannot be inherited.

The following tables list the members exposed by SQLiteParameter.

Public Constructors

Name | Description
SQLiteParameter | Overloaded. Initializes a new instance of the SQLiteParameter class.
Top

Public Properties

 | Name | Description
Public property | DbType | Overridden. Returns the datatype of the parameter
Public property | Direction | Overridden. Supports only input parameters
Public property | IsNullable | Overridden. Whether or not the parameter can contain a null value
Public property | ParameterName | Overridden. Returns the parameter name
Public property | Size | Overridden. Returns the size of the parameter
Public property | SourceColumn | Overridden. Gets/sets the source column
Public property | SourceColumnNullMapping | Overridden. Used by DbCommandBuilder to determine the mapping for nullable fields
Public property | SourceVersion | Overridden. Gets and sets the row version
Public property | Value | Overridden. Gets and sets the parameter value. If no datatype was specified, the datatype will assume the type from the value given.
Top

Public Methods

 | Name | Description
Public method | Clone | Clones a parameter
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | ResetDbType | Overridden. Resets the DbType of the parameter so it can be inferred from the value
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

Explicit Interface Implementations

Name | Description
SQLiteParameter | Overloaded. Initializes a new instance of the SQLiteParameter class.
Top

See Also

SQLiteParameter Class


SQLiteParameter Constructor

SQLiteParameter Constructor

Initializes a new instance of the SQLiteParameter class.

Overload List

 | Name | Description
Public method | SQLiteParameter | Default constructor
Public method | SQLiteParameter (DbType) | Constructs an unnamed parameter of the specified data type
Public method | SQLiteParameter (DbType, Int32) | Constructs an unnamed parameter of the specified type and size
Public method | SQLiteParameter (DbType, Int32, String) | Constructs an unnamed parameter of the specified type, size, and source column
Public method | SQLiteParameter (DbType, Int32, String, DataRowVersion) | Constructs an unnamed parameter of the specified type, size, source column and row version
Public method | SQLiteParameter (DbType, Object) | Constructs an unnamed parameter of the specified data type and sets the initial value
Public method | SQLiteParameter (DbType, String) | Constructs an unnamed parameter of the specified data type and source column
Public method | SQLiteParameter (DbType, String, DataRowVersion) | Constructs an unnamed parameter of the specified data type, source column and row version
Public method | SQLiteParameter (String) | Constructs a named parameter given the specified parameter name
Public method | SQLiteParameter (String, DbType) | Constructs a named parameter of the specified type
Public method | SQLiteParameter (String, DbType, Int32) | Constructs a named parameter of the specified type and size
Public method | SQLiteParameter (String, DbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object) | Constructs a named parameter of the specified type, size, source column and row version
Public method | SQLiteParameter (String, DbType, Int32, ParameterDirection, Byte, Byte, String, DataRowVersion, Boolean, Object) | Constructs a named parameter, yet another flavor
Public method | SQLiteParameter (String, DbType, Int32, String) | Constructs a named parameter of the specified type, size and source column
Public method | SQLiteParameter (String, DbType, Int32, String, DataRowVersion) | Constructs a named parameter of the specified type, size, source column and row version
Public method | SQLiteParameter (String, DbType, String) | Constructs a named parameter of the specified type and source column reference
Public method | SQLiteParameter (String, DbType, String, DataRowVersion) | Constructs a named parameter of the specified type, source column and row version
Public method | SQLiteParameter (String, Object) | Constructs a named parameter given the specified parameter name and initial value

See Also

SQLiteParameter Class


SQLiteParameter Constructor ()

SQLiteParameter Constructor ()
See Also Example
[image]

Default constructor

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New()
C#
public SQLiteParameter()
C++
public:
SQLiteParameter() sealed
J#
public SQLiteParameter()
JScript
public function SQLiteParameter()

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (DbType)

SQLiteParameter Constructor (DbType)
See Also Example
[image]

Constructs an unnamed parameter of the specified data type

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal dbType As DbType _
)
C#
public SQLiteParameter(
DbType dbType
)
C++
public:
SQLiteParameter(
DbType dbType
) sealed
J#
public SQLiteParameter(
DbType dbType
)
JScript
public function SQLiteParameter(
dbType : DbType
)

Parameters

dbType
The datatype of the parameter

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (DbType, Int32)

SQLiteParameter Constructor (DbType, Int32)
See Also Example
[image]

Constructs an unnamed parameter of the specified type and size

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer _
)
C#
public SQLiteParameter(
DbType parameterType,
int parameterSize
)
C++
public:
SQLiteParameter(
DbType parameterType,
int parameterSize
) sealed
J#
public SQLiteParameter(
DbType parameterType,
int parameterSize
)
JScript
public function SQLiteParameter(
parameterType : DbType,
parameterSize : int
)

Parameters

parameterType
The data type
parameterSize
The size of the parameter

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (DbType, Int32, String)

SQLiteParameter Constructor (DbType, Int32, String)
See Also Example
[image]

Constructs an unnamed parameter of the specified type, size, and source column

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer, _
ByVal sourceColumn As String _
)
C#
public SQLiteParameter(
DbType parameterType,
int parameterSize,
string sourceColumn
)
C++
public:
SQLiteParameter(
DbType parameterType,
int parameterSize,
String sourceColumn
) sealed
J#
public SQLiteParameter(
DbType parameterType,
int parameterSize,
string sourceColumn
)
JScript
public function SQLiteParameter(
parameterType : DbType,
parameterSize : int,
sourceColumn : String
)

Parameters

parameterType
The data type
parameterSize
The size of the parameter
sourceColumn
The source column

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (DbType, Int32, String, DataRowVersion)

SQLiteParameter Constructor (DbType, Int32, String, DataRowVersion)
See Also Example
[image]

Constructs an unnamed parameter of the specified type, size, source column and row version

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer, _
ByVal sourceColumn As String, _
ByVal rowVersion As DataRowVersion _
)
C#
public SQLiteParameter(
DbType parameterType,
int parameterSize,
string sourceColumn,
DataRowVersion rowVersion
)
C++
public:
SQLiteParameter(
DbType parameterType,
int parameterSize,
String sourceColumn,
DataRowVersion rowVersion
) sealed
J#
public SQLiteParameter(
DbType parameterType,
int parameterSize,
string sourceColumn,
DataRowVersion rowVersion
)
JScript
public function SQLiteParameter(
parameterType : DbType,
parameterSize : int,
sourceColumn : String,
rowVersion : DataRowVersion
)

Parameters

parameterType
The data type
parameterSize
The size of the parameter
sourceColumn
The source column
rowVersion
The row version information

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (DbType, Object)

SQLiteParameter Constructor (DbType, Object)
See Also Example
[image]

Constructs an unnamed parameter of the specified data type and sets the initial value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal dbType As DbType, _
ByVal value As Object _
)
C#
public SQLiteParameter(
DbType dbType,
object value
)
C++
public:
SQLiteParameter(
DbType dbType,
Object value
) sealed
J#
public SQLiteParameter(
DbType dbType,
object value
)
JScript
public function SQLiteParameter(
dbType : DbType,
value : Object
)

Parameters

dbType
The datatype of the parameter
value
The initial value of the parameter

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (DbType, String)

SQLiteParameter Constructor (DbType, String)
See Also Example
[image]

Constructs an unnamed parameter of the specified data type and source column

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal dbType As DbType, _
ByVal sourceColumn As String _
)
C#
public SQLiteParameter(
DbType dbType,
string sourceColumn
)
C++
public:
SQLiteParameter(
DbType dbType,
String sourceColumn
) sealed
J#
public SQLiteParameter(
DbType dbType,
string sourceColumn
)
JScript
public function SQLiteParameter(
dbType : DbType,
sourceColumn : String
)

Parameters

dbType
The datatype of the parameter
sourceColumn
The source column

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (DbType, String, DataRowVersion)

SQLiteParameter Constructor (DbType, String, DataRowVersion)
See Also Example
[image]

Constructs an unnamed parameter of the specified data type, source column and row version

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal dbType As DbType, _
ByVal sourceColumn As String, _
ByVal rowVersion As DataRowVersion _
)
C#
public SQLiteParameter(
DbType dbType,
string sourceColumn,
DataRowVersion rowVersion
)
C++
public:
SQLiteParameter(
DbType dbType,
String sourceColumn,
DataRowVersion rowVersion
) sealed
J#
public SQLiteParameter(
DbType dbType,
string sourceColumn,
DataRowVersion rowVersion
)
JScript
public function SQLiteParameter(
dbType : DbType,
sourceColumn : String,
rowVersion : DataRowVersion
)

Parameters

dbType
The data type
sourceColumn
The source column
rowVersion
The row version information

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String)

SQLiteParameter Constructor (String)
See Also Example
[image]

Constructs a named parameter given the specified parameter name

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String _
)
C#
public SQLiteParameter(
string parameterName
)
C++
public:
SQLiteParameter(
String parameterName
) sealed
J#
public SQLiteParameter(
string parameterName
)
JScript
public function SQLiteParameter(
parameterName : String
)

Parameters

parameterName
The parameter name

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, DbType)

SQLiteParameter Constructor (String, DbType)
See Also Example
[image]

Constructs a named parameter of the specified type

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal dbType As DbType _
)
C#
public SQLiteParameter(
string parameterName,
DbType dbType
)
C++
public:
SQLiteParameter(
String parameterName,
DbType dbType
) sealed
J#
public SQLiteParameter(
string parameterName,
DbType dbType
)
JScript
public function SQLiteParameter(
parameterName : String,
dbType : DbType
)

Parameters

parameterName
The parameter name
dbType
The datatype of the parameter

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, DbType, Int32)

SQLiteParameter Constructor (String, DbType, Int32)
See Also Example
[image]

Constructs a named parameter of the specified type and size

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer _
)
C#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize
)
C++
public:
SQLiteParameter(
String parameterName,
DbType parameterType,
int parameterSize
) sealed
J#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize
)
JScript
public function SQLiteParameter(
parameterName : String,
parameterType : DbType,
parameterSize : int
)

Parameters

parameterName
The parameter name
parameterType
The data type
parameterSize
The size of the parameter

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, DbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)

SQLiteParameter Constructor (String, DbType, Int32, ParameterDirection, Boolean, Byte, Byte, String, DataRowVersion, Object)
See Also Example
[image]

Constructs a named parameter of the specified type, size, source column and row version

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer, _
ByVal direction As ParameterDirection, _
ByVal isNullable As Boolean, _
ByVal precision As Byte, _
ByVal scale As Byte, _
ByVal sourceColumn As String, _
ByVal rowVersion As DataRowVersion, _
ByVal value As Object _
)
C#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize,
ParameterDirection direction,
bool isNullable,
byte precision,
byte scale,
string sourceColumn,
DataRowVersion rowVersion,
object value
)
C++
public:
SQLiteParameter(
String parameterName,
DbType parameterType,
int parameterSize,
ParameterDirection direction,
bool isNullable,
char precision,
char scale,
String sourceColumn,
DataRowVersion rowVersion,
Object value
) sealed
J#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize,
ParameterDirection direction,
bool isNullable,
byte precision,
byte scale,
string sourceColumn,
DataRowVersion rowVersion,
object value
)
JScript
public function SQLiteParameter(
parameterName : String,
parameterType : DbType,
parameterSize : int,
direction : ParameterDirection,
isNullable : bool,
precision : Byte,
scale : Byte,
sourceColumn : String,
rowVersion : DataRowVersion,
value : Object
)

Parameters

parameterName
The name of the parameter
parameterType
The data type
parameterSize
The size of the parameter
direction
Only input parameters are supported in SQLite
isNullable
Ignored
precision
Ignored
scale
Ignored
sourceColumn
The source column
rowVersion
The row version information
value
The initial value to assign the parameter

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, DbType, Int32, ParameterDirection, Byte, Byte, String, DataRowVersion, Boolean, Object)

SQLiteParameter Constructor (String, DbType, Int32, ParameterDirection, Byte, Byte, String, DataRowVersion, Boolean, Object)
See Also Example
[image]

Constructs a named parameter, yet another flavor

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer, _
ByVal direction As ParameterDirection, _
ByVal precision As Byte, _
ByVal scale As Byte, _
ByVal sourceColumn As String, _
ByVal rowVersion As DataRowVersion, _
ByVal sourceColumnNullMapping As Boolean, _
ByVal value As Object _
)
C#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize,
ParameterDirection direction,
byte precision,
byte scale,
string sourceColumn,
DataRowVersion rowVersion,
bool sourceColumnNullMapping,
object value
)
C++
public:
SQLiteParameter(
String parameterName,
DbType parameterType,
int parameterSize,
ParameterDirection direction,
char precision,
char scale,
String sourceColumn,
DataRowVersion rowVersion,
bool sourceColumnNullMapping,
Object value
) sealed
J#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize,
ParameterDirection direction,
byte precision,
byte scale,
string sourceColumn,
DataRowVersion rowVersion,
bool sourceColumnNullMapping,
object value
)
JScript
public function SQLiteParameter(
parameterName : String,
parameterType : DbType,
parameterSize : int,
direction : ParameterDirection,
precision : Byte,
scale : Byte,
sourceColumn : String,
rowVersion : DataRowVersion,
sourceColumnNullMapping : bool,
value : Object
)

Parameters

parameterName
The name of the parameter
parameterType
The data type
parameterSize
The size of the parameter
direction
Only input parameters are supported in SQLite
precision
Ignored
scale
Ignored
sourceColumn
The source column
rowVersion
The row version information
sourceColumnNullMapping
Whether or not this parameter is for comparing NULL's
value
The intial value to assign the parameter

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, DbType, Int32, String)

SQLiteParameter Constructor (String, DbType, Int32, String)
See Also Example
[image]

Constructs a named parameter of the specified type, size and source column

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer, _
ByVal sourceColumn As String _
)
C#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize,
string sourceColumn
)
C++
public:
SQLiteParameter(
String parameterName,
DbType parameterType,
int parameterSize,
String sourceColumn
) sealed
J#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize,
string sourceColumn
)
JScript
public function SQLiteParameter(
parameterName : String,
parameterType : DbType,
parameterSize : int,
sourceColumn : String
)

Parameters

parameterName
The name of the parameter
parameterType
The data type
parameterSize
The size of the parameter
sourceColumn
The source column

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, DbType, Int32, String, DataRowVersion)

SQLiteParameter Constructor (String, DbType, Int32, String, DataRowVersion)
See Also Example
[image]

Constructs a named parameter of the specified type, size, source column and row version

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer, _
ByVal sourceColumn As String, _
ByVal rowVersion As DataRowVersion _
)
C#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize,
string sourceColumn,
DataRowVersion rowVersion
)
C++
public:
SQLiteParameter(
String parameterName,
DbType parameterType,
int parameterSize,
String sourceColumn,
DataRowVersion rowVersion
) sealed
J#
public SQLiteParameter(
string parameterName,
DbType parameterType,
int parameterSize,
string sourceColumn,
DataRowVersion rowVersion
)
JScript
public function SQLiteParameter(
parameterName : String,
parameterType : DbType,
parameterSize : int,
sourceColumn : String,
rowVersion : DataRowVersion
)

Parameters

parameterName
The name of the parameter
parameterType
The data type
parameterSize
The size of the parameter
sourceColumn
The source column
rowVersion
The row version information

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, DbType, String)

SQLiteParameter Constructor (String, DbType, String)
See Also Example
[image]

Constructs a named parameter of the specified type and source column reference

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal dbType As DbType, _
ByVal sourceColumn As String _
)
C#
public SQLiteParameter(
string parameterName,
DbType dbType,
string sourceColumn
)
C++
public:
SQLiteParameter(
String parameterName,
DbType dbType,
String sourceColumn
) sealed
J#
public SQLiteParameter(
string parameterName,
DbType dbType,
string sourceColumn
)
JScript
public function SQLiteParameter(
parameterName : String,
dbType : DbType,
sourceColumn : String
)

Parameters

parameterName
The parameter name
dbType
The data type
sourceColumn
The source column

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, DbType, String, DataRowVersion)

SQLiteParameter Constructor (String, DbType, String, DataRowVersion)
See Also Example
[image]

Constructs a named parameter of the specified type, source column and row version

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal dbType As DbType, _
ByVal sourceColumn As String, _
ByVal rowVersion As DataRowVersion _
)
C#
public SQLiteParameter(
string parameterName,
DbType dbType,
string sourceColumn,
DataRowVersion rowVersion
)
C++
public:
SQLiteParameter(
String parameterName,
DbType dbType,
String sourceColumn,
DataRowVersion rowVersion
) sealed
J#
public SQLiteParameter(
string parameterName,
DbType dbType,
string sourceColumn,
DataRowVersion rowVersion
)
JScript
public function SQLiteParameter(
parameterName : String,
dbType : DbType,
sourceColumn : String,
rowVersion : DataRowVersion
)

Parameters

parameterName
The parameter name
dbType
The data type
sourceColumn
The source column
rowVersion
The row version information

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


SQLiteParameter Constructor (String, Object)

SQLiteParameter Constructor (String, Object)
See Also Example
[image]

Constructs a named parameter given the specified parameter name and initial value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub New( _
ByVal parameterName As String, _
ByVal value As Object _
)
C#
public SQLiteParameter(
string parameterName,
object value
)
C++
public:
SQLiteParameter(
String parameterName,
Object value
) sealed
J#
public SQLiteParameter(
string parameterName,
object value
)
JScript
public function SQLiteParameter(
parameterName : String,
value : Object
)

Parameters

parameterName
The parameter name
value
The initial value of the parameter

See Also

SQLiteParameter Class
SQLiteParameter Constructor Overload List


Properties

SQLiteParameter Properties
[image]

Public Properties

 | Name | Description
Public property | DbType | Overridden. Returns the datatype of the parameter
Public property | Direction | Overridden. Supports only input parameters
Public property | IsNullable | Overridden. Whether or not the parameter can contain a null value
Public property | ParameterName | Overridden. Returns the parameter name
Public property | Size | Overridden. Returns the size of the parameter
Public property | SourceColumn | Overridden. Gets/sets the source column
Public property | SourceColumnNullMapping | Overridden. Used by DbCommandBuilder to determine the mapping for nullable fields
Public property | SourceVersion | Overridden. Gets and sets the row version
Public property | Value | Overridden. Gets and sets the parameter value. If no datatype was specified, the datatype will assume the type from the value given.
Top

See Also

SQLiteParameter Class


DbType Property

SQLiteParameter.DbType Property
[image]

Returns the datatype of the parameter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property DbType As DbType _
Implements IDataParameter.DbType
C#
public override DbType DbType { get; set; }
C++
public override property DbType DbType override {
DbType get();
void set(DbType value);
}
J#
/** property */
public DbType get_DbType();

/** property */
public void set_DbType(DbType value);
JScript
public function get DbType() : DbType

public function set DbType(value : DbType);

Implements

IDataParameter.DbType

See Also

SQLiteParameter Class


Direction Property

SQLiteParameter.Direction Property
[image]

Supports only input parameters

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property Direction As ParameterDirection _
Implements IDataParameter.Direction
C#
public override ParameterDirection Direction { get; set; }
C++
public override property ParameterDirection Direction override {
ParameterDirection get();
void set(ParameterDirection value);
}
J#
/** property */
public ParameterDirection get_Direction();

/** property */
public void set_Direction(ParameterDirection value);
JScript
public function get Direction() : ParameterDirection

public function set Direction(value : ParameterDirection);

Implements

IDataParameter.Direction

See Also

SQLiteParameter Class


IsNullable Property

SQLiteParameter.IsNullable Property
[image]

Whether or not the parameter can contain a null value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property IsNullable As Boolean _
Implements IDataParameter.IsNullable
C#
public override bool IsNullable { get; set; }
C++
public override property bool IsNullable override {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_IsNullable();

/** property */
public void set_IsNullable(bool value);
JScript
public function get IsNullable() : bool

public function set IsNullable(value : bool);

Implements

IDataParameter.IsNullable

See Also

SQLiteParameter Class


ParameterName Property

SQLiteParameter.ParameterName Property
[image]

Returns the parameter name

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property ParameterName As String _
Implements IDataParameter.ParameterName
C#
public override string ParameterName { get; set; }
C++
public override property string ParameterName override {
String get();
void set(String value);
}
J#
/** property */
public string get_ParameterName();

/** property */
public void set_ParameterName(string value);
JScript
public function get ParameterName() : String

public function set ParameterName(value : String);

Implements

IDataParameter.ParameterName

See Also

SQLiteParameter Class


Size Property

SQLiteParameter.Size Property
[image]

Returns the size of the parameter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property Size As Integer _
Implements IDbDataParameter.Size
C#
public override int Size { get; set; }
C++
public override property int Size override {
int get();
void set(int value);
}
J#
/** property */
public int get_Size();

/** property */
public void set_Size(int value);
JScript
public function get Size() : int

public function set Size(value : int);

Implements

IDbDataParameter.Size

See Also

SQLiteParameter Class


SourceColumn Property

SQLiteParameter.SourceColumn Property
[image]

Gets/sets the source column

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property SourceColumn As String _
Implements IDataParameter.SourceColumn
C#
public override string SourceColumn { get; set; }
C++
public override property string SourceColumn override {
String get();
void set(String value);
}
J#
/** property */
public string get_SourceColumn();

/** property */
public void set_SourceColumn(string value);
JScript
public function get SourceColumn() : String

public function set SourceColumn(value : String);

Implements

IDataParameter.SourceColumn

See Also

SQLiteParameter Class


SourceColumnNullMapping Property

SQLiteParameter.SourceColumnNullMapping Property
[image]

Used by DbCommandBuilder to determine the mapping for nullable fields

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property SourceColumnNullMapping As Boolean
C#
public override bool SourceColumnNullMapping { get; set; }
C++
public override property bool SourceColumnNullMapping override {
bool get();
void set(bool value);
}
J#
/** property */
public bool get_SourceColumnNullMapping();

/** property */
public void set_SourceColumnNullMapping(bool value);
JScript
public function get SourceColumnNullMapping() : bool

public function set SourceColumnNullMapping(value : bool);

See Also

SQLiteParameter Class


SourceVersion Property

SQLiteParameter.SourceVersion Property
[image]

Gets and sets the row version

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property SourceVersion As DataRowVersion _
Implements IDataParameter.SourceVersion
C#
public override DataRowVersion SourceVersion { get; set; }
C++
public override property DataRowVersion SourceVersion override {
DataRowVersion get();
void set(DataRowVersion value);
}
J#
/** property */
public DataRowVersion get_SourceVersion();

/** property */
public void set_SourceVersion(DataRowVersion value);
JScript
public function get SourceVersion() : DataRowVersion

public function set SourceVersion(value : DataRowVersion);

Implements

IDataParameter.SourceVersion

See Also

SQLiteParameter Class


Value Property

SQLiteParameter.Value Property
[image]

Gets and sets the parameter value. If no datatype was specified, the datatype will assume the type from the value given.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Property Value As Object _
Implements IDataParameter.Value
C#
public override object Value { get; set; }
C++
public override property object Value override {
Object get();
void set(Object value);
}
J#
/** property */
public object get_Value();

/** property */
public void set_Value(object value);
JScript
public function get Value() : Object

public function set Value(value : Object);

Implements

IDataParameter.Value

See Also

SQLiteParameter Class


Methods

SQLiteParameter Methods
[image]

Public Methods

 | Name | Description
Public method | Clone | Clones a parameter
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | ResetDbType | Overridden. Resets the DbType of the parameter so it can be inferred from the value
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteParameter Class


Clone Method

SQLiteParameter.Clone Method
[image]

Clones a parameter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function Clone() As Object _
Implements ICloneable.Clone
C#
public object Clone()
C++
public:
Object Clone() sealed
J#
public object Clone()
JScript
public function Clone() : Object

Return Value

A new, unassociated SQLiteParameter

Implements

ICloneable.Clone

See Also

SQLiteParameter Class


ResetDbType Method

SQLiteParameter.ResetDbType Method
[image]

Resets the DbType of the parameter so it can be inferred from the value

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub ResetDbType()
C#
public override void ResetDbType()
C++
public:
virtual void ResetDbType() override
J#
public override void ResetDbType()
JScript
public override function ResetDbType()

See Also

SQLiteParameter Class


SQLiteParameterCollection Class

SQLiteParameterCollection Class
See Also Example Members
[image]

SQLite implementation of DbParameterCollection. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteParameterCollection
Inherits DbParameterCollection
C#
public sealed class SQLiteParameterCollection : DbParameterCollection
C++
ref class SQLiteParameterCollection sealed : DbParameterCollection
J#
public final class SQLiteParameterCollection extends DbParameterCollection
JScript
public final class SQLiteParameterCollection extends DbParameterCollection

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbParameterCollection
System.Data.SQLite.SQLiteParameterCollection

See Also

SQLiteParameterCollection Members


SQLiteParameterCollection Members

SQLiteParameterCollection Members
See Also Example Properties Methods
[image]

SQLite implementation of DbParameterCollection. This class cannot be inherited.

The following tables list the members exposed by SQLiteParameterCollection.

Public Properties

 | Name | Description
Public property | Count | Overridden. Returns a count of parameters in the collection
Public property | IsFixedSize | Overridden. Returns false
Public property | IsReadOnly | Overridden. Returns false
Public property | IsSynchronized | Overridden. Returns true
Public property | Item | Overloaded. Gets and sets a DbParameter in the collection.
Public property | SyncRoot | Overridden. Returns null
Top

Public Methods

 | Name | Description
Public method | Add | Overloaded. Adds a parameter to the collection
Public method | AddRange | Overloaded. Adds an array of parameters to the collection
Public method | AddWithValue | Adds a named/unnamed parameter and its value to the parameter collection.
Public method | Clear | Overridden. Clears the array and resets the collection
Public method | Contains | Overloaded. Indicates whether a DbParameter with the specified property exists in the collection.
Public method | CopyTo | Overridden. Not implemented
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetEnumerator | Overridden. Retrieves an enumerator for the collection
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | IndexOf | Overloaded. Returns the index of the specified DbParameter object.
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | Insert | Overridden. Inserts a parameter into the array at the specified location
Public method | Remove | Overridden. Removes a parameter from the collection
Public method | RemoveAt | Overloaded. Removes a specified DbParameter object from the collection.
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteParameterCollection Class


Properties

SQLiteParameterCollection Properties
[image]

Public Properties

 | Name | Description
Public property | Count | Overridden. Returns a count of parameters in the collection
Public property | IsFixedSize | Overridden. Returns false
Public property | IsReadOnly | Overridden. Returns false
Public property | IsSynchronized | Overridden. Returns true
Public property | Item | Overloaded. Gets and sets a DbParameter in the collection.
Public property | SyncRoot | Overridden. Returns null
Top

See Also

SQLiteParameterCollection Class


Count Property

SQLiteParameterCollection.Count Property
[image]

Returns a count of parameters in the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property Count As Integer _
Implements ICollection.Count
C#
public override int Count { get; }
C++
public override property int Count override {
int get();
}
J#
/** property */
public int get_Count();
JScript
public function get Count() : int

Implements

ICollection.Count

See Also

SQLiteParameterCollection Class


IsFixedSize Property

SQLiteParameterCollection.IsFixedSize Property
[image]

Returns false

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property IsFixedSize As Boolean _
Implements IList.IsFixedSize
C#
public override bool IsFixedSize { get; }
C++
public override property bool IsFixedSize override {
bool get();
}
J#
/** property */
public bool get_IsFixedSize();
JScript
public function get IsFixedSize() : bool

Implements

IList.IsFixedSize

See Also

SQLiteParameterCollection Class


IsReadOnly Property

SQLiteParameterCollection.IsReadOnly Property
[image]

Returns false

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property IsReadOnly As Boolean _
Implements IList.IsReadOnly
C#
public override bool IsReadOnly { get; }
C++
public override property bool IsReadOnly override {
bool get();
}
J#
/** property */
public bool get_IsReadOnly();
JScript
public function get IsReadOnly() : bool

Implements

IList.IsReadOnly

See Also

SQLiteParameterCollection Class


IsSynchronized Property

SQLiteParameterCollection.IsSynchronized Property
[image]

Returns true

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property IsSynchronized As Boolean _
Implements ICollection.IsSynchronized
C#
public override bool IsSynchronized { get; }
C++
public override property bool IsSynchronized override {
bool get();
}
J#
/** property */
public bool get_IsSynchronized();
JScript
public function get IsSynchronized() : bool

Implements

ICollection.IsSynchronized

See Also

SQLiteParameterCollection Class


Item Property

SQLiteParameterCollection.Item Property

Gets and sets a DbParameter in the collection.

Overload List

 | Name | Description
Public property | Item (Int32) | Overloaded to specialize the return value of the default indexer
Public property | Item (String) | Overloaded to specialize the return value of the default indexer

See Also

SQLiteParameterCollection Class


Item Property (Int32)

SQLiteParameterCollection.Item Property (Int32)
See Also Example
[image]

Overloaded to specialize the return value of the default indexer

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Default Property Item( _
ByVal index As Integer _
) As SQLiteParameter
C#
public new SQLiteParameter this[
int index
] { get; set; }
C++
public new property SQLiteParameter default[int index] sealed {
SQLiteParameter get(int index);
void set(int index, SQLiteParameter value);
}
J#
/** property */
public SQLiteParameter get_Item(int index);

/** property */
public void set_Item(int index, SQLiteParameter value);
JScript
JScript supports the use of indexed properties, but not the declaration of new ones.

Parameters

index
The index of the parameter to get/set

Property Value

The specified SQLite parameter

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Item Overload List


Item Property (String)

SQLiteParameterCollection.Item Property (String)
See Also Example
[image]

Overloaded to specialize the return value of the default indexer

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows Default Property Item( _
ByVal parameterName As String _
) As SQLiteParameter
C#
public new SQLiteParameter this[
string parameterName
] { get; set; }
C++
public new property SQLiteParameter default[String parameterName] sealed {
SQLiteParameter get(String parameterName);
void set(String parameterName, SQLiteParameter value);
}
J#
/** property */
public SQLiteParameter get_Item(string parameterName);

/** property */
public void set_Item(string parameterName, SQLiteParameter value);
JScript
JScript supports the use of indexed properties, but not the declaration of new ones.

Parameters

parameterName
Name of the parameter to get/set

Property Value

The specified named SQLite parameter

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Item Overload List


SyncRoot Property

SQLiteParameterCollection.SyncRoot Property
[image]

Returns null

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property SyncRoot As Object _
Implements ICollection.SyncRoot
C#
public override object SyncRoot { get; }
C++
public override property object SyncRoot override {
Object get();
}
J#
/** property */
public object get_SyncRoot();
JScript
public function get SyncRoot() : Object

Implements

ICollection.SyncRoot

See Also

SQLiteParameterCollection Class


Methods

SQLiteParameterCollection Methods
[image]

Public Methods

 | Name | Description
Public method | Add | Overloaded. Adds a parameter to the collection
Public method | AddRange | Overloaded. Adds an array of parameters to the collection
Public method | AddWithValue | Adds a named/unnamed parameter and its value to the parameter collection.
Public method | Clear | Overridden. Clears the array and resets the collection
Public method | Contains | Overloaded. Indicates whether a DbParameter with the specified property exists in the collection.
Public method | CopyTo | Overridden. Not implemented
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetEnumerator | Overridden. Retrieves an enumerator for the collection
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | IndexOf | Overloaded. Returns the index of the specified DbParameter object.
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | Insert | Overridden. Inserts a parameter into the array at the specified location
Public method | Remove | Overridden. Removes a parameter from the collection
Public method | RemoveAt | Overloaded. Removes a specified DbParameter object from the collection.
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteParameterCollection Class


Add Method

SQLiteParameterCollection.Add Method

Adds a parameter to the collection

Overload List

 | Name | Description
Public method | Add (SQLiteParameter) | Adds a parameter to the collection
Public method | Add (Object) | Overridden. Adds a parameter to the collection
Public method | Add (String, DbType) | Adds a parameter to the collection
Public method | Add (String, DbType, Int32) | Adds a parameter to the collection
Public method | Add (String, DbType, Int32, String) | Adds a parameter to the collection

See Also

SQLiteParameterCollection Class


Add Method (SQLiteParameter)

SQLiteParameterCollection.Add Method (SQLiteParameter)
See Also Example
[image]

Adds a parameter to the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function Add( _
ByVal parameter As SQLiteParameter _
) As Integer
C#
public int Add(
SQLiteParameter parameter
)
C++
public:
int Add(
SQLiteParameter parameter
) sealed
J#
public int Add(
SQLiteParameter parameter
)
JScript
public function Add(
parameter : SQLiteParameter
) : int

Parameters

parameter
The parameter to add

Return Value

A zero-based index of where the parameter is located in the array

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Add Overload List


Add Method (Object)

SQLiteParameterCollection.Add Method (Object)
See Also Example
[image]

Adds a parameter to the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function Add( _
ByVal value As Object _
) As Integer _
Implements IList.Add
C#
public override int Add(
object value
)
C++
public:
virtual int Add(
Object value
) override
J#
public override int Add(
object value
)
JScript
public override function Add(
value : Object
) : int

Parameters

value
The parameter to add

Return Value

A zero-based index of where the parameter is located in the array

Implements

IList.Add

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Add Overload List


Add Method (String, DbType)

SQLiteParameterCollection.Add Method (String, DbType)
See Also Example
[image]

Adds a parameter to the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function Add( _
ByVal parameterName As String, _
ByVal parameterType As DbType _
) As SQLiteParameter
C#
public SQLiteParameter Add(
string parameterName,
DbType parameterType
)
C++
public:
SQLiteParameter Add(
String parameterName,
DbType parameterType
) sealed
J#
public SQLiteParameter Add(
string parameterName,
DbType parameterType
)
JScript
public function Add(
parameterName : String,
parameterType : DbType
) : SQLiteParameter

Parameters

parameterName
The parameter name
parameterType
The data type

Return Value

A SQLiteParameter object

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Add Overload List


Add Method (String, DbType, Int32)

SQLiteParameterCollection.Add Method (String, DbType, Int32)
See Also Example
[image]

Adds a parameter to the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function Add( _
ByVal parameterName As String, _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer _
) As SQLiteParameter
C#
public SQLiteParameter Add(
string parameterName,
DbType parameterType,
int parameterSize
)
C++
public:
SQLiteParameter Add(
String parameterName,
DbType parameterType,
int parameterSize
) sealed
J#
public SQLiteParameter Add(
string parameterName,
DbType parameterType,
int parameterSize
)
JScript
public function Add(
parameterName : String,
parameterType : DbType,
parameterSize : int
) : SQLiteParameter

Parameters

parameterName
The parameter name
parameterType
The data type
parameterSize
The size of the value

Return Value

A SQLiteParameter object

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Add Overload List


Add Method (String, DbType, Int32, String)

SQLiteParameterCollection.Add Method (String, DbType, Int32, String)
See Also Example
[image]

Adds a parameter to the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function Add( _
ByVal parameterName As String, _
ByVal parameterType As DbType, _
ByVal parameterSize As Integer, _
ByVal sourceColumn As String _
) As SQLiteParameter
C#
public SQLiteParameter Add(
string parameterName,
DbType parameterType,
int parameterSize,
string sourceColumn
)
C++
public:
SQLiteParameter Add(
String parameterName,
DbType parameterType,
int parameterSize,
String sourceColumn
) sealed
J#
public SQLiteParameter Add(
string parameterName,
DbType parameterType,
int parameterSize,
string sourceColumn
)
JScript
public function Add(
parameterName : String,
parameterType : DbType,
parameterSize : int,
sourceColumn : String
) : SQLiteParameter

Parameters

parameterName
The parameter name
parameterType
The data type
parameterSize
The size of the value
sourceColumn
The source column

Return Value

A SQLiteParameter object

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Add Overload List


AddRange Method

SQLiteParameterCollection.AddRange Method

Adds an array of parameters to the collection

Overload List

 | Name | Description
Public method | AddRange (Array) | Overridden. Adds an array of parameters to the collection
Public method | AddRange (SQLiteParameter) | Adds an array of parameters to the collection

See Also

SQLiteParameterCollection Class


AddRange Method (Array)

SQLiteParameterCollection.AddRange Method (Array)
See Also Example
[image]

Adds an array of parameters to the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub AddRange( _
ByVal values As Array _
)
C#
public override void AddRange(
Array values
)
C++
public:
virtual void AddRange(
Array values
) override
J#
public override void AddRange(
Array values
)
JScript
public override function AddRange(
values : Array
)

Parameters

values
The array of parameters to add

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.AddRange Overload List


AddRange Method (SQLiteParameter[])

SQLiteParameterCollection.AddRange Method (SQLiteParameter[])
See Also Example
[image]

Adds an array of parameters to the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Sub AddRange( _
ByVal values As SQLiteParameter() _
)
C#
public void AddRange(
SQLiteParameter[] values
)
C++
public:
void AddRange(
array<SQLiteParameter>^ values
) sealed
J#
public void AddRange(
SQLiteParameter[] values
)
JScript
public function AddRange(
values : SQLiteParameter[]
)

Parameters

values
The array of parameters to add

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.AddRange Overload List


AddWithValue Method

SQLiteParameterCollection.AddWithValue Method
[image]

Adds a named/unnamed parameter and its value to the parameter collection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Function AddWithValue( _
ByVal parameterName As String, _
ByVal value As Object _
) As SQLiteParameter
C#
public SQLiteParameter AddWithValue(
string parameterName,
object value
)
C++
public:
SQLiteParameter AddWithValue(
String parameterName,
Object value
) sealed
J#
public SQLiteParameter AddWithValue(
string parameterName,
object value
)
JScript
public function AddWithValue(
parameterName : String,
value : Object
) : SQLiteParameter

Parameters

parameterName
Name of the parameter, or null to indicate an unnamed parameter
value
The initial value of the parameter

Return Value

Returns the SQLiteParameter object created during the call.

See Also

SQLiteParameterCollection Class


Clear Method

SQLiteParameterCollection.Clear Method
[image]

Clears the array and resets the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Clear() _
Implements IList.Clear
C#
public override void Clear()
C++
public:
virtual void Clear() override
J#
public override void Clear()
JScript
public override function Clear()

Implements

IList.Clear

See Also

SQLiteParameterCollection Class


Contains Method

SQLiteParameterCollection.Contains Method

Indicates whether a DbParameter with the specified property exists in the collection.

Overload List

 | Name | Description
Public method | Contains (Object) | Overridden. Determines if the parameter exists in the collection
Public method | Contains (String) | Overridden. Determines if the named parameter exists in the collection

See Also

SQLiteParameterCollection Class


Contains Method (Object)

SQLiteParameterCollection.Contains Method (Object)
See Also Example
[image]

Determines if the parameter exists in the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function Contains( _
ByVal value As Object _
) As Boolean _
Implements IList.Contains
C#
public override bool Contains(
object value
)
C++
public:
virtual bool Contains(
Object value
) override
J#
public override bool Contains(
object value
)
JScript
public override function Contains(
value : Object
) : bool

Parameters

value
The SQLiteParameter to check

Return Value

True if the parameter is in the collection

Implements

IList.Contains

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Contains Overload List


Contains Method (String)

SQLiteParameterCollection.Contains Method (String)
See Also Example
[image]

Determines if the named parameter exists in the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function Contains( _
ByVal parameterName As String _
) As Boolean _
Implements IDataParameterCollection.Contains
C#
public override bool Contains(
string parameterName
)
C++
public:
virtual bool Contains(
String parameterName
) override
J#
public override bool Contains(
string parameterName
)
JScript
public override function Contains(
parameterName : String
) : bool

Parameters

parameterName
The name of the parameter to check

Return Value

True if the parameter is in the collection

Implements

IDataParameterCollection.Contains

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.Contains Overload List


CopyTo Method

SQLiteParameterCollection.CopyTo Method
[image]

Not implemented

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub CopyTo( _
ByVal array As Array, _
ByVal index As Integer _
) _
Implements ICollection.CopyTo
C#
public override void CopyTo(
Array array,
int index
)
C++
public:
virtual void CopyTo(
Array array,
int index
) override
J#
public override void CopyTo(
Array array,
int index
)
JScript
public override function CopyTo(
array : Array,
index : int
)

Parameters

array
index

Implements

ICollection.CopyTo

See Also

SQLiteParameterCollection Class


GetEnumerator Method

SQLiteParameterCollection.GetEnumerator Method
[image]

Retrieves an enumerator for the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function GetEnumerator() As IEnumerator _
Implements IEnumerable.GetEnumerator
C#
public override IEnumerator GetEnumerator()
C++
public:
virtual IEnumerator GetEnumerator() override
J#
public override IEnumerator GetEnumerator()
JScript
public override function GetEnumerator() : IEnumerator

Return Value

An enumerator for the underlying array

Implements

IEnumerable.GetEnumerator

See Also

SQLiteParameterCollection Class


IndexOf Method

SQLiteParameterCollection.IndexOf Method

Returns the index of the specified DbParameter object.

Overload List

 | Name | Description
Public method | IndexOf (Object) | Overridden. Returns the index of a parameter
Public method | IndexOf (String) | Overridden. Returns the index of a parameter given its name

See Also

SQLiteParameterCollection Class


IndexOf Method (Object)

SQLiteParameterCollection.IndexOf Method (Object)
See Also Example
[image]

Returns the index of a parameter

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function IndexOf( _
ByVal value As Object _
) As Integer _
Implements IList.IndexOf
C#
public override int IndexOf(
object value
)
C++
public:
virtual int IndexOf(
Object value
) override
J#
public override int IndexOf(
object value
)
JScript
public override function IndexOf(
value : Object
) : int

Parameters

value
The parameter to find

Return Value

-1 if not found, otherwise a zero-based index of the parameter

Implements

IList.IndexOf

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.IndexOf Overload List


IndexOf Method (String)

SQLiteParameterCollection.IndexOf Method (String)
See Also Example
[image]

Returns the index of a parameter given its name

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Function IndexOf( _
ByVal parameterName As String _
) As Integer _
Implements IDataParameterCollection.IndexOf
C#
public override int IndexOf(
string parameterName
)
C++
public:
virtual int IndexOf(
String parameterName
) override
J#
public override int IndexOf(
string parameterName
)
JScript
public override function IndexOf(
parameterName : String
) : int

Parameters

parameterName
The name of the parameter to find

Return Value

-1 if not found, otherwise a zero-based index of the parameter

Implements

IDataParameterCollection.IndexOf

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.IndexOf Overload List


Insert Method

SQLiteParameterCollection.Insert Method
[image]

Inserts a parameter into the array at the specified location

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Insert( _
ByVal index As Integer, _
ByVal value As Object _
) _
Implements IList.Insert
C#
public override void Insert(
int index,
object value
)
C++
public:
virtual void Insert(
int index,
Object value
) override
J#
public override void Insert(
int index,
object value
)
JScript
public override function Insert(
index : int,
value : Object
)

Parameters

index
The zero-based index to insert the parameter at
value
The parameter to insert

Implements

IList.Insert

See Also

SQLiteParameterCollection Class


Remove Method

SQLiteParameterCollection.Remove Method
[image]

Removes a parameter from the collection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Remove( _
ByVal value As Object _
) _
Implements IList.Remove
C#
public override void Remove(
object value
)
C++
public:
virtual void Remove(
Object value
) override
J#
public override void Remove(
object value
)
JScript
public override function Remove(
value : Object
)

Parameters

value
The parameter to remove

Implements

IList.Remove

See Also

SQLiteParameterCollection Class


RemoveAt Method

SQLiteParameterCollection.RemoveAt Method

Removes a specified DbParameter object from the collection.

Overload List

 | Name | Description
Public method | RemoveAt (Int32) | Overridden. Removes a parameter from the collection given its index
Public method | RemoveAt (String) | Overridden. Removes a parameter from the collection given its name

See Also

SQLiteParameterCollection Class


RemoveAt Method (Int32)

SQLiteParameterCollection.RemoveAt Method (Int32)
See Also Example
[image]

Removes a parameter from the collection given its index

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub RemoveAt( _
ByVal index As Integer _
) _
Implements IList.RemoveAt
C#
public override void RemoveAt(
int index
)
C++
public:
virtual void RemoveAt(
int index
) override
J#
public override void RemoveAt(
int index
)
JScript
public override function RemoveAt(
index : int
)

Parameters

index
The zero-based parameter index to remove

Implements

IList.RemoveAt

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.RemoveAt Overload List


RemoveAt Method (String)

SQLiteParameterCollection.RemoveAt Method (String)
See Also Example
[image]

Removes a parameter from the collection given its name

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub RemoveAt( _
ByVal parameterName As String _
) _
Implements IDataParameterCollection.RemoveAt
C#
public override void RemoveAt(
string parameterName
)
C++
public:
virtual void RemoveAt(
String parameterName
) override
J#
public override void RemoveAt(
string parameterName
)
JScript
public override function RemoveAt(
parameterName : String
)

Parameters

parameterName
The name of the parameter to remove

Implements

IDataParameterCollection.RemoveAt

See Also

SQLiteParameterCollection Class
SQLiteParameterCollection.RemoveAt Overload List


SQLiteTransaction Class

SQLiteTransaction Class
See Also Example Members
[image]

SQLite implementation of DbTransaction. This class cannot be inherited.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public NotInheritable Class SQLiteTransaction
Inherits DbTransaction
C#
public sealed class SQLiteTransaction : DbTransaction
C++
ref class SQLiteTransaction sealed : DbTransaction
J#
public final class SQLiteTransaction extends DbTransaction
JScript
public final class SQLiteTransaction extends DbTransaction

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbTransaction
System.Data.SQLite.SQLiteTransaction

See Also

SQLiteTransaction Members


SQLiteTransaction Members

SQLiteTransaction Members
See Also Example Properties Methods
[image]

SQLite implementation of DbTransaction. This class cannot be inherited.

The following tables list the members exposed by SQLiteTransaction.

Public Properties

 | Name | Description
Public property | Connection | Returns the underlying connection to which this transaction applies.
Public property | IsolationLevel | Overridden. Gets the isolation level of the transaction. SQLite only supports Serializable transactions.
Top

Public Methods

 | Name | Description
Public method | Commit | Overridden. Commits the current transaction.
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Dispose | Releases the unmanaged resources used by the DbTransaction. (inherited from DbTransaction)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | Rollback | Overridden. Rolls back the active transaction.
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteTransaction Class


Properties

SQLiteTransaction Properties
[image]

Public Properties

 | Name | Description
Public property | Connection | Returns the underlying connection to which this transaction applies.
Public property | IsolationLevel | Overridden. Gets the isolation level of the transaction. SQLite only supports Serializable transactions.
Top

See Also

SQLiteTransaction Class


Connection Property

SQLiteTransaction.Connection Property
[image]

Returns the underlying connection to which this transaction applies.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Shadows ReadOnly Property Connection As SQLiteConnection
C#
public new SQLiteConnection Connection { get; }
C++
public new property SQLiteConnection Connection sealed {
SQLiteConnection get();
}
J#
/** property */
public SQLiteConnection get_Connection();
JScript
public function get Connection() : SQLiteConnection

See Also

SQLiteTransaction Class


IsolationLevel Property

SQLiteTransaction.IsolationLevel Property
[image]

Gets the isolation level of the transaction. SQLite only supports Serializable transactions.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides ReadOnly Property IsolationLevel As IsolationLevel _
Implements IDbTransaction.IsolationLevel
C#
public override IsolationLevel IsolationLevel { get; }
C++
public override property IsolationLevel IsolationLevel override {
IsolationLevel get();
}
J#
/** property */
public IsolationLevel get_IsolationLevel();
JScript
public function get IsolationLevel() : IsolationLevel

Implements

IDbTransaction.IsolationLevel

See Also

SQLiteTransaction Class


Methods

SQLiteTransaction Methods
[image]

Public Methods

 | Name | Description
Public method | Commit | Overridden. Commits the current transaction.
Public method | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (inherited from MarshalByRefObject)
Public method | Dispose | Releases the unmanaged resources used by the DbTransaction. (inherited from DbTransaction)
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (inherited from MarshalByRefObject)
Public method | Rollback | Overridden. Rolls back the active transaction.
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

See Also

SQLiteTransaction Class


Commit Method

SQLiteTransaction.Commit Method
[image]

Commits the current transaction.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Commit() _
Implements IDbTransaction.Commit
C#
public override void Commit()
C++
public:
virtual void Commit() override
J#
public override void Commit()
JScript
public override function Commit()

Implements

IDbTransaction.Commit

See Also

SQLiteTransaction Class


Rollback Method

SQLiteTransaction.Rollback Method
[image]

Rolls back the active transaction.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Overrides Sub Rollback() _
Implements IDbTransaction.Rollback
C#
public override void Rollback()
C++
public:
virtual void Rollback() override
J#
public override void Rollback()
JScript
public override function Rollback()

Implements

IDbTransaction.Rollback

See Also

SQLiteTransaction Class


SQLiteUpdateEventHandler Delegate

SQLiteUpdateEventHandler Delegate
[image]

Raised when data is inserted, updated and deleted on a given connection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Delegate Sub SQLiteUpdateEventHandler( _
ByVal sender As Object, _
ByVal e As UpdateEventArgs _
)
C#
public delegate void SQLiteUpdateEventHandler(
object sender,
UpdateEventArgs e
)
C++
public delegate void SQLiteUpdateEventHandler(
Object sender,
UpdateEventArgs e
)
J#
/** delegate */
public delegate void SQLiteUpdateEventHandler(
object sender,
UpdateEventArgs e
)
JScript
JScript suports the use of delegates, but not the declaration of new ones.

Parameters

sender
The connection committing the transaction
e
The event parameters which triggered the event

See Also


SynchronizationModes Enumeration

SynchronizationModes Enumeration
[image]

The I/O file cache flushing behavior for the connection

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Enum SynchronizationModes
C#
public enum SynchronizationModes
C++
public enum class SynchronizationModes
J#
public enum SynchronizationModes
JScript
public enum SynchronizationModes

Members

Member Name | Description
Normal | Normal file flushing at critical sections of the code
Full | Full file flushing after every write operation
Off | Use the default operating system's file flushing, SQLite does not explicitly flush the file buffers after writing

See Also


TypeAffinity Enumeration

TypeAffinity Enumeration
[image]

SQLite has very limited types, and is inherently text-based. The first 5 types below represent the sum of all types SQLite understands. The DateTime extension to the spec is for internal use only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Enum TypeAffinity
C#
public enum TypeAffinity
C++
public enum class TypeAffinity
J#
public enum TypeAffinity
JScript
public enum TypeAffinity

Members

Member Name | Description
Uninitialized | Not used
Int64 | All integers in SQLite default to Int64
Double | All floating point numbers in SQLite default to double
Text | The default data type of SQLite is text
Blob | Typically blob types are only seen when returned from a function
Null | Null types can be returned from functions
DateTime | Used internally by this provider
None | Used internally

See Also


UpdateEventArgs Class

UpdateEventArgs Class
See Also Example Members
[image]

Passed during an Update callback, these event arguments detail the type of update operation being performed on the given connection.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Class UpdateEventArgs
Inherits EventArgs
C#
public class UpdateEventArgs : EventArgs
C++
ref class UpdateEventArgs : EventArgs
J#
public class UpdateEventArgs extends EventArgs
JScript
public class UpdateEventArgs extends EventArgs

Inheritance Hierarchy

System.Object
System.EventArgs
System.Data.SQLite.UpdateEventArgs

See Also

UpdateEventArgs Members


UpdateEventArgs Members

UpdateEventArgs Members
See Also Example Fields Methods
[image]

Passed during an Update callback, these event arguments detail the type of update operation being performed on the given connection.

The following tables list the members exposed by UpdateEventArgs.

Public Fields

 | Name | Description
Public field | Database | The name of the database being updated (usually "main" but can be any attached or temporary database) This field is read-only.
Public field | Event | The type of update being performed (insert/update/delete) This field is read-only.
Public field | RowId | The RowId affected by this update. This field is read-only.
Public field | Table | The name of the table being updated This field is read-only.
Top

Public Methods

 | Name | Description
Public method | Equals | Determines whether the specified Object is equal to the current Object. (inherited from Object)
Public method | GetHashCode | Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table. (inherited from Object)
Public method | GetType | Gets the Type of the current instance. (inherited from Object)
Public method | ToString | Returns a String that represents the current Object. (inherited from Object)
Top

Protected Methods

 | Name | Description
Family method | Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Family method | MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object)
Top

See Also

UpdateEventArgs Class


Fields

UpdateEventArgs Fields
[image]

Public Fields

 | Name | Description
Public field | Database | The name of the database being updated (usually "main" but can be any attached or temporary database) This field is read-only.
Public field | Event | The type of update being performed (insert/update/delete) This field is read-only.
Public field | RowId | The RowId affected by this update. This field is read-only.
Public field | Table | The name of the table being updated This field is read-only.
Top

See Also

UpdateEventArgs Class


Database Field

UpdateEventArgs.Database Field
[image]

The name of the database being updated (usually "main" but can be any attached or temporary database) This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public ReadOnly Database As String
C#
public readonly string Database;
C++
public:
const String Database sealed ;
J#
public final string Database
JScript
public const var Database : String;

See Also

UpdateEventArgs Class


Event Field

UpdateEventArgs.Event Field
[image]

The type of update being performed (insert/update/delete) This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public ReadOnly Event As UpdateEventType
C#
public readonly UpdateEventType Event;
C++
public:
const UpdateEventType Event sealed ;
J#
public final UpdateEventType Event
JScript
public const var Event : UpdateEventType;

See Also

UpdateEventArgs Class


RowId Field

UpdateEventArgs.RowId Field
[image]

The RowId affected by this update. This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public ReadOnly RowId As Long
C#
public readonly long RowId;
C++
public:
const __int64 RowId sealed ;
J#
public final long RowId
JScript
public const var RowId : long;

See Also

UpdateEventArgs Class


Table Field

UpdateEventArgs.Table Field
[image]

The name of the table being updated This field is read-only.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public ReadOnly Table As String
C#
public readonly string Table;
C++
public:
const String Table sealed ;
J#
public final string Table
JScript
public const var Table : String;

See Also

UpdateEventArgs Class


UpdateEventType Enumeration

UpdateEventType Enumeration
[image]

Whenever an update event is triggered on a connection, this enum will indicate exactly what type of operation is being performed.

Namespace: System.Data.SQLite
Assembly: System.Data.SQLite (in System.Data.SQLite.DLL)

Syntax

Visual Basic (Declaration)
Public Enum UpdateEventType
C#
public enum UpdateEventType
C++
public enum class UpdateEventType
J#
public enum UpdateEventType
JScript
public enum UpdateEventType

Members

Member Name | Description
Delete | A row is being deleted from the given database and table
Insert | A row is being inserted into the table.
Update | A row is being updated in the table.

See Also


System.Data.SQLite Hierarchy

System.Data.SQLite Hierarchy
System.Object
System.Attribute
System.Data.SQLite.SQLiteFunctionAttribute
System.Data.Common.DbConnectionStringBuilder ---- System.Collections.ICollection, System.Collections.IDictionary, System.Collections.IEnumerable, System.ComponentModel.ICustomTypeDescriptor
System.Data.SQLite.SQLiteConnectionStringBuilder
System.Data.Common.DbProviderFactory
System.Data.SQLite.SQLiteFactory ---- System.IServiceProvider
System.Data.SQLite.SQLiteConvert
System.Data.SQLite.SQLiteFunction ---- System.IDisposable
System.Data.SQLite.SQLiteMetaDataCollectionNames
System.Delegate ---- System.ICloneable, System.Runtime.Serialization.ISerializable
System.MulticastDelegate
System.Data.SQLite.SQLiteCommitHandler
System.Data.SQLite.SQLiteUpdateEventHandler
System.EventArgs
System.Data.SQLite.CommitEventArgs
System.Data.SQLite.UpdateEventArgs
System.Exception ---- System.Runtime.Serialization.ISerializable
System.SystemException
System.Runtime.InteropServices.ExternalException
System.Data.Common.DbException
System.Data.SQLite.SQLiteException
System.MarshalByRefObject
System.ComponentModel.Component ---- System.ComponentModel.IComponent, System.IDisposable
System.Data.Common.DataAdapter ---- System.Data.IDataAdapter
System.Data.Common.DbDataAdapter ---- System.Data.IDbDataAdapter, System.ICloneable
System.Data.SQLite.SQLiteDataAdapter
System.Data.Common.DbCommand ---- System.Data.IDbCommand
System.Data.SQLite.SQLiteCommand ---- System.ICloneable
System.Data.Common.DbCommandBuilder
System.Data.SQLite.SQLiteCommandBuilder
System.Data.Common.DbConnection ---- System.Data.IDbConnection
System.Data.SQLite.SQLiteConnection ---- System.ICloneable
System.Data.Common.DbDataReader ---- System.Collections.IEnumerable, System.Data.IDataReader, System.Data.IDataRecord, System.IDisposable
System.Data.SQLite.SQLiteDataReader
System.Data.Common.DbParameter ---- System.Data.IDataParameter, System.Data.IDbDataParameter
System.Data.SQLite.SQLiteParameter ---- System.ICloneable
System.Data.Common.DbParameterCollection ---- System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Data.IDataParameterCollection
System.Data.SQLite.SQLiteParameterCollection
System.Data.Common.DbTransaction ---- System.Data.IDbTransaction, System.IDisposable
System.Data.SQLite.SQLiteTransaction
System.ValueType
System.Enum ---- System.IComparable, System.IConvertible, System.IFormattable
System.Data.SQLite.FunctionType
System.Data.SQLite.SQLiteDateFormats
System.Data.SQLite.SQLiteErrorCode
System.Data.SQLite.SynchronizationModes
System.Data.SQLite.TypeAffinity
System.Data.SQLite.UpdateEventType

See Also


SDK Link Manager

NDoc Utilities
SDK Link Manager

SDK Link Namespace