Description
Connect a database
Parameters
icDB | input | character | Physical database name. |
icConnect | input | character | Connect parameters |
ihClass | input | handle | Handle to the class that is using the persistence layer. In most of the cases, this handle will be available in the preprocessor {&TARGETPROCEDURE}. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program2/other.p)
if vcUserId = ""
then do:
<M-1 run MainBlock
(input icDB (icLogicalDbName),
output vcUserId (ocLogin),
output vcPassword (ocPassword)) in dbinfo>
run gipr_DeleteProcedure in vhFcComponent.
delete procedure vhFcComponent.
end.
run SqlConnect in {&TARGETPROCEDURE}
(input icConnect,
input icDB,
input vcUserId,
input vcPassword,
output oiReturnStatus).
if oiReturnStatus <> 0
then do:
<M-2 run SqlErrorMessage (input ihClass (ihClass),
output viFcReturnSuper (oiReturnStatus)) in other>
end.