将文件从路径上传到sql2008中的varbinary [英] Upload file from a path to varbinary in sql2008
本文介绍了将文件从路径上传到sql2008中的varbinary的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个文件,其路径在表格的列中可用X
我需要编写一个触发器,以便在更新表格X时将文件内容保存到同一个表格X的另一列中。
任何人都可以建议
紧急!!!
解决方案
写入您的更新触发器查询
- ----------------------
INSERT INTO 数据文件(数据)
SELECT * FROM OPENROWSET (
BULK ' C:\ dataata.txt',
SINGLE_BLOB) AS x;< / pre>
I have a file whose path is available in a column of a table X
I need to write a trigger to save the file content into another column of the same table X while updating the table X.
Can any one plz advise
urgent!!!
解决方案
write in your updatetrigger query ------------------------ INSERT INTO datafile(data) SELECT * FROM OPENROWSET( BULK 'C:\datafile.txt', SINGLE_BLOB) AS x;</pre>
这篇关于将文件从路径上传到sql2008中的varbinary的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文