A sample script is shown below that queries a database and sends a fax to the recipient using the fax number retrieved in the record:

; Name: 00000098.iif

; Date: September 1, 2001

; Purpose: Test database dll

;

$type question

$script "Please enter your account number"

$get_var ACCTNO 6 6

$validate none

$next_box 99

; Name: 00000099.iif

; Date: September 1, 2001

; Purpose: Test database dll

;

$type decision

$set_var DB_FILE "PFX%=C:\My Documents\test.mdb[Customers]"

$if @DB_RESULT 0

  $next_box s31

$else

  $set_var DB_SELECT "AcctNo=@ACCTNO"

  $set_var DB_ACTION get_record

  $if @DB_RESULT > 0

    $next_box 199

  $else

    $next_box 299

  $endif

$endif

; Name: 00000199.iif

; Date: September 1, 2001

; Purpose: Test database dll

;

$type decision

$set_var RCVRFAX @PFX%FaxNumber

$add_image 1000

$set_var ROUTETO @PFX%Name

$set_var SENTTO @PFX%Name

$next_box s72

; Name: 00000299.iif

; Date: September 1, 2001

; Purpose: Test database dll

;

$type voice

$image_des s

$script "Your record is not on file. Please call ....."

$next_box s31