Skip to content

04 GetConnectionString

AndrewMB2 edited this page Nov 21, 2025 · 4 revisions

GetConnectionString method

Gets a connection string for use with CreateConnection or GetQueryTable. Returns True if successful, otherwise False.

Applies to

TableData ArrData RsetData Xdata XShared

Parameters

Name Type Description
Filename String Name/path or url/IP address of the database to connect.
ConnType CnType enumeration Type of database to connect (see below).
IMEX Integer (optional) IMEX=1 tells the driver to always read "intermixed" data columns as text, though the connection is then read only.
InitialCatalog String (optional) For SQL Server this is the Initial Catalog parameter in the connection string; For MySQL this is the Database parameter in the connection string; not used for other databases.
UserID String (optional) For SQL Server this is the User ID parameter in the connection string; for MySQL this is the UID parameter in the connection string; not used for other databases.
Password String (optional) For SQL Server this is the Password parameter in the connection string; for MySQL this is the PWD parameter in the connection string; not used for other databases.

GetConnectionString is only called directly by the user when using the CreateConnection method or the GetQueryTable method on a RsetData object which has not already been connected to a database.

The type of database is specified in the ConnType parameter and can be one of:

Value Database
cnExcel12xml Excel workbook in open XML format
cnExcel12 Excel workbook in binary format
cnAccess Microsoft Access
cnSQLServer Microsoft SQL Server
cnMySql MySQL
cnDBISAM DBISAM (Elevate Software)

The appropriate type of cursor is also retrieved.

03 How To

04 Property and Method Reference

Clone this wiki locally