Promotic
WikipediaLinkedInYoutubeTwitterFacebook

DbOpen - method of object PmAdo

Description:
Connecting the PmAdo object to the database. The connection is executed via the ADO Connection object, that is contained in the PmAdo object. The parameters that are needed for connection are defined in the properties DbConnectionString and DbConnectionParams.
Syntax:
DbOpen As Boolean
Calling:
b = oDb.DbOpen()
Return Values:
true - Database connection successful.
false - Database connection failed.
Example:
Connecting the PmAdo object ("/TestAdoDb") to the database ("pm_data"), for MS SQL Server (local instance named ".\SQLEXPRESS"), using the basic ADO Provider by the Microsoft company ("SQLOLEDB"), including the use of login name and password (MS SQL Server authentization).
Dim oDb
Set oDb = pMe.Pm("/TestAdoDb")
oDb.DbConnectionString = "Provider=SQLOLEDB;Server=.\SQLEXPRESS;Database=pm_data;uid=pm_admin;pwd=pmadmin;"
If Not oDb.DbOpen Then
  ...
End If
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice