Show / Hide Table of Contents
  • BC HTML Api reference
    • html-api
      • AnnotationArrowOrientation
      • AnnotationTextAlignment
      • AnnotationTextFontFamily
      • BarcodeOrientation
      • BarcodeThresholdMode
      • BarcodeType
      • BatchEnums
        • Mode
        • Queue
      • CallContext
      • DbClient
      • DbServer
      • FileMimeType
      • FileType
      • IAnnotation
      • IAnnotationProperties
      • IApplication
      • IBarcodeData
      • IBaseControl
      • IBatch
      • IBatchClass
      • IButton
      • ICheckBox
      • IComboBox
      • ICustomThemeConfig
      • IDocument
      • IDocumentClass
      • IField
      • IFieldValidation
      • IFileInfo
      • IFolder
      • IFolderClass
      • IFormType
      • IGroup
      • IIndexClass
      • IITModule
      • IJob
      • ILabel
      • ILicenseGroup
      • IListItem
      • IListView
      • ImageColorMode
      • ImageOperationType
      • INode
      • INodeComment
      • INodeReviewComment
      • INuanceEngineConfig
      • IOCRConfiguration
      • IPage
        • Side
      • IRadioButton
      • IRecognitionProfile
      • IRectangle
      • IRegexValidation
      • IScanProfile
      • ITable
      • ITabView
      • ITextBox
      • IthConfig
      • ITitledPanel
      • IUser
      • LevelName
      • NodeReviewStatus
      • NuanceEngine
      • NuanceLanguage
      • NuanceMode
      • PageSideMode
      • RecognitionEngine
      • RpcService
      • ScanService
      • ScanSource
      • ScriptActionType
      • ScriptResultConsts
      • ScriptResultProp
      • UnloadReason

Interface DbClient

This object provides access to methods that allow executing queries on ad-hoc databases. The database driver .jar must be added in the class path of the HTML Service under WEB-INF/lib

In order to initialize this object, the database driver type must be provided:

var db = new DbClient("sqljdbc42.jar");

Methods list

connect(dbUrl, dbUser, dbPass) query(sql)

Methods

connect(dbUrl, dbUser, dbPass)

Initializes a connection to the provided database url. This method is required to be called before attempting to execute a query.

Declaration
connect(dbUrl: string, dbUser: string, dbPass: string): Promise<void>;
Parameters
Type Name Description
string dbUrl
string dbUser
string dbPass
Returns
Type Description
Promise<void>

query(sql)

Executes the provided sql query. The query must be complete and cannot be parameterizable. The executed query results are returned as a table.

Declaration
query(sql: string): Promise<Array<Array<any>>>;
Parameters
Type Name Description
string sql
Returns
Type Description
Promise<Array<Array<any>>>
Back to top Generated by DocFX