ADODB Connection Object
The ADODB.Connection
object provides methods to interact with
database.
Remarks
ADODB Connection
object uses Connection
String as Input
to make Connection with Database. Incase SELECT query returns
ADODB.RecordSet
and for other queries it will give number of
affected records.
The following code illustrates how to create ADODB Connection
object:
Object Name: ADODB.Connection
Dim Obj ' Create a variable.
Set Obj = CreateObject("ADODB.Connection")
Note:
Currently HFM follows a standard way to get a connection string from preconfigured DB information in xml configuration file. ( For more information, see Wshell.Script Object).
Connection string mainly contain fields like these.
SQL DB Connection String:
Provider=2;DRIVER={<DRIVER_NAME>};SERVER=<DB_SERVER_NAME>;PORT=<DB_SERVER_PORT>;Database=<DATABASE_NAME>;UID={<USERNAME>};PWD={<PASSWORD>}
Oracle DB Connection String:
Provider=1;DRIVER={<DRIVER_NAME>};HOST=<DB_SERVER_NAME>;PORT=<DB_SERVER_PORT>;SN=<DB_SERVICE_NAME>;UID={<DB_SCHEMA_NAME>};PWD={<DB_SCHEMA_PWD>}"