2,723
社区成员
发帖
与我相关
我的任务
分享
id int (not null / key)
fff image (null)
*-- 创建测试数据
create cursor t1 (id int, fff blob)
append blank
append memo fff from (getfile('pdf'))
*-- 保存到 sql server
hh = SQLStringConnect('Driver={SQL Server};Server=(Local);Database=test;Uid=sa;Pwd=连接口令')
? SqlExec(hh, 'insert into test (id, fff) values (1, ?fff)')
SQLDisconnect(hh)
use in t1
*-- 从 sql server 中取出另存
hh = SQLStringConnect('Driver={SQL Server};Server=(Local);Database=test;Uid=sa;Pwd=连接口令')
CursorSetProp("MapBinary", .t., 0)
? SqlExec(hh, 'select fff from test where id = 1', 't2')
SQLDisconnect(hh)
copy memo fff to c:\1.pdf