Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

Description

 
Get or Set the details used to create a connection to a data source.

 

Syntax

 

GET

s = <ADODB_Connection>.ConnectionString

 

SET

<ADODB_Connection>.ConnectionString = sConnectionString

 

Returns

 

String: current connection string.

 

Parameters

 

Name

Type

Optional

Meaning

sConnectionString

String

Yes

A string value that contains information about the connection. The string is composed of a series of parameter=value statements separated by semicolons.

 

 

Remarks

 

Restrictions

 

See also

 

A useful reference site for connection string: https://www.connectionstrings.com/

 

Examples

 

String sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & APP_SourcePath & "Biblio.mdb"

 

'---Declare a new pConnection variable

Dim pConnection As ADODB_CONNECTION

'---Instantiate it as new connection

pConnection = New ADODB_CONNECTION '[(sConn)]

'---Open indicating connection string

pConnection.Open(sConn)

 

Alternative

 

'---Declare a new pConnection variable and instantiate it in one line

Dim pConnection As New ADODB_CONNECTION '[(sConn)]

'---Set connection string

pConnection.ConnectionString = sConn

'---Open connection. Connection string is taken from ConnectionString property

pConnection.Open

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software