Guidance
指路人
g.yi.org
software / rapidq / Examples / Database / Tsunami Record Manager 2.5 / TRM_RQInsert.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     $INCLUDE "TRM_RQOpen.bas"

     TYPE dRecord
      Record AS STRING * 36
      EmIDNum AS STRING * 6
      EmName  AS STRING * 25
      EmDeNum AS STRING * 5
     END TYPE

     FUNCTION FormatTRMdRecord(Sender AS dRecord) AS STRING
      Sender.Record = Sender.EmIDNum & Sender.EmName &Sender.EmDeNum
      result = Sender.Record
     END FUNCTION

     DIM TRMdRecord AS dRecord
     DIM Record AS STRING * 36

'\--- Assigning a "field" values ------------------------------------------\

     TRMdRecord.EmIDNum = "    17"
     TRMdRecord.EmName  = "Duarte        Jose      A"
     TRMdRecord.EmDeNum = "    7"

     Record = FormatTRMdRecord(TRMdRecord)

     CmdTsu.op = Tsu_Insert
     CmdTsu.file = hWnd
     CmdTsu.dataptr = VARPTR(Record)
     CmdTsu.datalen = LEN(Record)

     Result = trm_udt(CmdTsu)

     SELECT CASE Result
     CASE 0    : SHOWMESSAGE "CODE: "& STR$(Result) &": Trm_Operation trm_Insert was sucessfull"
     CASE 2    : SHOWMESSAGE "CODE: "& STR$(Result) &": Trm_Operation trm_Insert encountered I/O errors"
     CASE 3    : SHOWMESSAGE "CODE: "& STR$(Result) &": Trm_Operation trm_Insert encountered file not found"
     CASE 5    : SHOWMESSAGE "CODE: "& STR$(Result) &": Trm_Operation trm_Insert encountered duplicate key"
     CASE 20   : SHOWMESSAGE "CODE: "& STR$(Result) &": Trm_Operation trm_Insert encountered invalid Record length"
     CASE 46   : SHOWMESSAGE "CODE: "& STR$(Result) &": Trm_Operation trm_Insert encountered access to file denied"
     CASE 99   : SHOWMESSAGE "CODE: "& STR$(Result) &": Trm_Operation trm_Insert encountered time-out"
     CASE ELSE : SHOWMESSAGE "CODE: "& STR$(Result) &": Trm_Operation trm_Insert encountered Unknown Error"
     END SELECT

掌柜推荐
 
 
¥860.00 ·
 
 
¥900.00 ·
 
 
¥810.00 ·
 
 
¥317.00 ·
 
 
¥1,370.00 ·
 
 
¥660.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-10-21 14:59:36