dotConnect for SQLite Documentation
Devart.Common Namespace / DbConnectionStringBuilder Class
Members Example

In This Topic
    DbConnectionStringBuilder Class
    In This Topic
    Generates automatically connection strings used to connect to a data source.
    Syntax
    Remarks
    The DbConnectionStringBuilder class provides the base class from which the strongly typed connection string builders (Devart.Data.SQLite.SQLiteConnectionStringBuilder) are derived. The connection string builders let developers programmatically create syntactically correct connection strings, and parse and rebuild existing connection strings. The DbConnectionStringBuilder has been defined in a data source-agnostic manner. Because of the addition of the Devart.Common namespace, developers require a base class against which they can program in order to build connection strings that can work against an arbitrary database. But it is possible using this class to create invalid connection strings. It is recommended to use the strongly typed connection string builders (Devart.Data.SQLite.SQLiteConnectionStringBuilder and so on) because they support only key/value pairs that are supported by particular data source; trying to add invalid pairs will throw an exception. For more information, refer to the description of the System.Data.Common.DbConnectionStringBuilder class in MSDN.
    Example
    Devart.Common.DbConnectionStringBuilder csb = new Devart.Common.DbConnectionStringBuilder();
    csb["Data Source"] = "D:\test.db";
    Devart.Data.SQLite.SQLiteConnection myConnection = new Devart.Data.SQLite.SQLiteConnection(csb.ConnectionString);
    Dim csb As Devart.Common.DbConnectionStringBuilder = New Devart.Common.DbConnectionStringBuilder
    csb("Data Source") = "D:\test.db"
    csb("Max Pool Size") = 150
    csb("Connection Timeout") = 30
    Dim myConnection As Devart.Data.SQLite.SQLiteConnection = New Devart.Data.SQLite.SQLiteConnection(csb.ConnectionString)
    Inheritance Hierarchy

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

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also