Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_DbConnectDatabase Access Wrapper

Public Sub Init (
SetConnType As xf_ConnTypeEnum,
SetSQLStatementFormat As xf_SQLStatementFormatEnum,
DbFullPathOrConnectString As String,
Optional UseWorkspace As Workspace,
Optional SetErrLogInfo As String = ""
)

Initialise the DbConnect object for a particular configuration

SetConnType as xf_ConnTypeEnum

The connection type (DAO, ADO, ODBCDirect)

SetSQLStatementFormat as xf_SQLStatementFormatEnum

The statement format (JET, MSSQL)

DbFullPathOrConnectString as String

The database connection string (ADO), or the full database path (DAO). A blank value defaults to CurrentProject.Connection or the current database.

Optional UseWorkspace as Workspace

Open the connection or database in this workspace If omitted, use the first compatible workspace, or create a new one.

Optional SetErrLogInfo as String = ""

Set an identifying string for use in tracking the source of error messages

Call Template:

xf.DbConnect.Init SetConnType, SetSQLStatementFormat, DbFullPathOrConnectString
xf.DbConnect.Init SetConnType, SetSQLStatementFormat, DbFullPathOrConnectString, UseWorkspace, SetErrLogInfo

See Also:

Example 1:

dim dbc as xf_DbConnect
dbc.Init xf_ConnType_AccessADO, xf_SQLStatementFormat_MSSQL, _
"Provider=SQLOLEDB;Data Source=TESTXP\SQL2008EXPRESS;Initial Catalog=TangGovernance;Integrated Security=SSPI;"
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd