数据库保存WORD附件

yjp2001187 2003-09-05 04:42:59
具体问题:
把一个已知的WORD文档,通过PB调进来,然后保存在数据库中。(相当于附件形式)
请各位帮忙,在线等待
...全文
44 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
tsingdao 2003-10-16
  • 打赏
  • 举报
回复
gz
flyerlxg 2003-09-06
  • 打赏
  • 举报
回复
study and help you up
liujiaqiang 2003-09-06
  • 打赏
  • 举报
回复
大宝不错!!!!
double22822 2003-09-06
  • 打赏
  • 举报
回复
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
yjp2001187 2003-09-06
  • 打赏
  • 举报
回复
数据库是sql server,能否给我原码
klbt 2003-09-05
  • 打赏
  • 举报
回复
可以考虑用大文本存入数据库。
你的数据库是?

1,108

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧