string ls_filename,ls_filepath
int li_rtn
li_rtn = getfileopenname("选择文件",ls_filepath,ls_filename,"doc","doc 文件 (*.doc),*.doc")
if li_rtn = 1 then
integer li_filenum,li_loops,li_counter
long ll_filelen,ll_butes_read,ll_new_pos
blob lb_our_blob,lb_tot_b,lb_temp
setnull(lb_tot_b)
ll_filelen = fileLength(ls_filepath)
li_filenum = fileopen(ls_filepath,streammode!,read!,lockread!)
if ll_filelen > 32765 then
li_loops = ((ll_filelen - 1)/ 32765) + 1
else
li_loops = 1
end if
for li_counter = 1 to li_loops
ll_butes_read = fileRead(li_filenum,lb_our_blob)
if li_counter=1 then
lb_tot_b = lb_our_blob
else
lb_tot_b = lb_tot_b +lb_our_blob
end if
ll_new_pos = ll_new_pos + ll_butes_read
fileseek(li_filenum,ll_new_pos,frombeginning!)
next
fileclose(li_filenum)
//return lb_tot_b
if len(lb_tot_b) = 0 then
messagebox('提示信息',"源文件为空或读文件失败,请重试!")
return
end if
else
return
end if
sqlca.autocommit = true
updateblob语句查帮助
sqlca.autocommit = false