Pcdsql – Kofax DM API User Manual

Page 130

Advertising
background image

110 C

HAPTER

3

PCDSQL

Dim sBuffer As String

Dim oLogin As New

PCDLogin

Dim nResult As Long

Dim sTempBuf As String

'Login process.

nResult = oLogin.

AddLogin

(0, "MyLibrary", "", "")

nResult = oLogin.

AddLogin

(0, "MyDomain", _

"MyUserID", "MyPassword")

'

'If your API application is licensed by Hummingbird

'to use SQL pass-through functionality when SQL

'pass-through functionality is disabled for general

'users, you should replace the previous 2 lines of

'code with the following two lines of code:

' nResult = oLogin.

AddLoginLicensed

(0, _

' “MyLibrary”, ““, _

' ““, “SQLpassthruID”, _

' “SQLpassthruLicenseID”)

' nResult = oLogin.

AddLoginLicensed

(0, _

' “MyDomain”, _

' “MyUserID“, _

' “MyPassword“, _

' “SQLpassthruID”, _

' “SQLpassthruLicenseID”)

'

nResult = oLogin.

Execute

()

sBuffer = oLogin.

GetDST

()

'Get And display the DST.

oDIC.

SetDST

(sBuffer)

tbDST.Text = oDIC.

GetDST

()

End Sub


'Programming Note:

'Without calling the oSelectSQL.

SetDST

, the

'oSelectSQL.Execute call would have failed,

Advertising