如何将XML文件插入sql数据库 [英] How to insert XML file into sql database
问题描述
我有XML文件,我想将该文件插入到sql表中。
我在下面写了代码插入
INSERT INTO E_AutoIssue_EmailTemplates(Template_value)
SELECT * FROM OPENROWSET(
BULK'C:\ Amey \\\ XML \ 60天autoissue.xml',
SINGLE_BLOB)其中EmailTemplateId = 1;
但它在下面给出错误
消息4834,等级16,状态1,行5
您无权使用批量加载对帐单。
任何人都可以告诉我插入文件的替代方法。
I have XML file and i want to insert that file in to sql table.
I have written below code for insert
INSERT INTO E_AutoIssue_EmailTemplates (Template_value)
SELECT * FROM OPENROWSET(
BULK 'C:\Amey\ACE\XML\60 days autoissue.xml',
SINGLE_BLOB) where EmailTemplateId=1;
but it gives below error
Msg 4834, Level 16, State 1, Line 5
You do not have permission to use the bulk load statement.
Can anyone tell me alternate way to insert file.
推荐答案
让我们看看有人在此之前遇到过这个问题...... [ ^ ]。
尝试下面提到的解决方案。
http://stackoverflow.com/questions/14604416/how-to-enable-bulk-permission-in-sql-server [ ^ ]
Try the solution mentioned below .
http://stackoverflow.com/questions/14604416/how-to-enable-bulk-permission-in-sql-server[^]
这篇关于如何将XML文件插入sql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!