Sql Querry中的错误(通过Querry打开txt文件) [英] Error in Sql querry (open a txt file via querry)

查看:140
本文介绍了Sql Querry中的错误(通过Querry打开txt文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

EXEC sp_configure 'show advanced options', '1' 
RECONFIGURE 
EXEC sp_configure 'Ad Hoc Distributed Queries', '1' 
RECONFIGURE;

USE master;
GO
CREATE TABLE myTable(FileName nvarchar(60), 
  FileType nvarchar(60), Document varbinary(max));
GO

INSERT INTO myTable(FileName, FileType, Document) 
   SELECT 'Exit.txt' AS FileName, '.txt' AS FileType, * FROM OPENROWSET(BULK N'E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Exit.txt', SINGLE_BLOB) AS Document;
GO



错误是-



error is-

Msg 4861, Level 16, State 1, Line 2
Cannot bulk load because the file "E:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Exit.txt" could not be opened. Operating system error code 3(failed to retrieve text for this error. Reason: 15105).

推荐答案

错误代码3"为ERROR_PATH_NOT_FOUND:文件不存在!
"error code 3" is ERROR_PATH_NOT_FOUND: the file does not exist!


这篇关于Sql Querry中的错误(通过Querry打开txt文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆