home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a063 / 6.img / SAMPLE / APTSQL / INVAL_1.FPL < prev    next >
Encoding:
Text File  |  1990-08-24  |  551 b   |  32 lines

  1. create apt proc inval_1() as
  2. begin
  3.     useform sntr_3
  4.     variable status  int
  5.  
  6.     call clcst_1(quantity, discount, price, total, status)
  7.  
  8.     if status = 0
  9.     begin
  10.         return
  11.     end
  12.     
  13.     submit
  14.     sqlbegin
  15.         insert sales values ({sqlexpr(storeid)}, {sqlexpr(ordernum)},
  16.             {sqlexpr(orderdate)}, convert(smallint, '{quantity}'),
  17.             {sqlexpr(terms)}, {sqlexpr(titleid)} )
  18.     sqlend
  19.  
  20.     if $channel:errors is NULL
  21.     begin
  22.         print "Values successfully inserted"
  23.     end
  24.     else
  25.     begin
  26.         print "Insert failed"
  27.         $channel:errors = NULL
  28.     end
  29.     
  30.     return
  31. end
  32.