A few obvious statements... Make sure the data file is on the server, like it is local. As astroutkarsh is saying. Put the file in a folder that is more visible to the SQL Engine for file access. For example, the "C:\Windows\" directory is NOT allowed by the SQL Engine to access there, unless you explicitly tell it to. However, the installation of SQL Server applies the correct permissions for file access to the directory where the DATA files are installed (the .MDF and .LDF files). The .MDF file (Microsoft Data File) is the data file where table data is stored in SQL Server. The .LDF file (Log Data File) is where the data transactions are stored temporarily until they are committed to the table (.MDF).
You're being instructed to put the two files in a new location. If you indicated a different location to install your SQL Data files, then update my location below. Otherwise, if you have applied a standard installation, then the following location will work for you.
Therefore ... move the files accordingly
'C:\Users\Test\Desktop\DATA.DAT' => move to => 'c:\program files\microsoft sql server\90\data\'
'C:\Users\Test\Desktop\singlelineformatfile.txt' => move to => 'c:\program files\microsoft sql server\90\data\'
Then, update your statement and re-execute it.
SELECT SUBSTRING(a.line,1,1) as ID,
SUBSTRING(a.line,2,2000) as Account
FROM OPENROWSET
( BULK
'c:\program files\microsoft sql server\90\data\DATA.DAT',
FORMATFILE =
'c:\program files\microsoft sql server\90\data\singlelineformatfile.txt') AS a
To recap, you need to do this (move the files to a new location) to allow the SQL Server Engine to find the files on the server in a folder permitted to seeing the files.