Picture storage in FORM development

xiaoxiao2021-03-06  41

Declare file_name varcha2 (120); image_type varcha2 (10); I integer; pnum integer: = 0; wjm varcha2 (200); begin: wjzl.wjbh: =: global.wjbh; if: wjzl.yh is not null themes ('Please select an empty page'); go_block ('wjzl'); return; end if; file_name: = win_api_dialog.open_file ('Please select a graphic file', '', 'BMP file (* .bmp) | *. BMP | GIF file (* .gif) | * .gif | TIF file (* .tif) | * .TIF | all files (*. *) | *. * |, True, win_api.ofn_flag_default, false; if FILE_NAME IS NOT NULL THEN i: = INSTR (File_name, '.', 1, 1); if i is not null dam, ially = substr (file_name, i 1, 3); if (image_type = 'tif ") Image_type: = image_type || 'f'; end if; wjm: =: global.wjbh ||: wjzl.yh || '.' || Image_type; Win_API_UTILITY.COPY_FILE (file_name, 'i: / dayj / scan /' || WJM, False, False; Copy ('i: / dayj / scan /' || wjm, 'wjzl.dz'); read_image_file ('i: / dayj / scan /' || wjm, image_type, 'wjzl .Ynr '); Select max (yh) INTO PNUM from wjzl where wjbh =: wjzl.wjbh; if pnum is null dam: = 1; Else PNum: = PNUM 1; END IF; COPY (TO_CHAR (PNUM), 'wjzl.yh'); commit; go_block ('wjzl'); end if; end if; en D;

转载请注明原文地址:https://www.9cbs.com/read-57226.html

New Post(0)