Skip to content

ConnectionString Property

Description

Gets/sets the data provider connection string.

Property Type

Read-write property

Syntax (Visual Basic)

Public Property ConnectionString() As String

Remarks

The ConnectionString is initially set when the data provider is set using the SetDataProvider method. The ConnectionString consists of a string that contains the data provider and data source.

The ConnectionString is in the format:

"Provider=xxx;Data Source=xxx"

The DataSource property parses the ConnectionString and returns only the Data Source.

For a Custom data provider, the Data Source is not used and can contain any extra useful information.

Below are some sample connection strings.

Example

Sample Connection Strings

' Built-in

' XML data provider (Memory)
"Provider=XML;Data Source=" & App.Path & "\Events.xml"

' MS Access data provider
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\events.mdb"

' MAPI MS Outlook data provider
"Provider=MAPI;Data Source=" & Path & "\Application Data\Microsoft\Outlook\outcmd.dat"

' Custom

' SQLServer data provider
"Provider=custom;DSN=CalendarSQL_Server"

' MySql data provider
"Provider=custom;DSN=Calendar_MySQL"

See Also


Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.