-
sql server 7 query for reading flat text file through OLE DB
Dear Sir,
I am facing problem in reading flat text file throgh SQL 7 query analyser.
My query is as follows
select * from openrowset('DTSFlatFile'
, 'Data Source=\\myserver\bosac7\t2.txt
;Mode=Read;Row Delimiter={LF};File Format=0;Column Delimiter=|
;File Type=1;Skip Rows=0;First Row Column Name=False
;Number of Column=0;Max characters per delimited column=255'
,'SELECT * ')
error given is
Server: Msg 7303, Level 16, State 2, Line 1
Could not initialize data source object of OLE DB provider 'DTSFlatFile'.
[OLE/DB provider returned message: Error opening datafile: The system cannot
find the file specified.]
content of text file T2 is
ACC | S R Investment | 500.00
REL | L R Trades | 300.00
Please note that T2.TXT file existing in the same folder as specified in
data source statement and
despite correct path it is giving error.
can u please give solution to the above problem
pl reply to bharat@comtek-india.com, bcsangani@hotmail.com
Thanks
Bharat Sangani
-
Re: sql server 7 query for reading flat text file through OLE DB
Make sure that the SQL Server service is not running under the LocalSystem
account. Under the LocalSystem account, SQL Server will not be able to
access resources on remote servers.
-Mike
--
Michael Levy MCDBA, MCSD, MCT
michaell@gasullivan.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks