Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Mar : Service Application accessing local files.
| Subject: | Service Application accessing local files. |
| Posted by: | "srdaniel" (srdani..@hotmail.com) |
| Date: | Mon, 5 Mar 2007 16:29:30 |
I'm trying to write a service application in order to execute queries on
a regular basis. The application used to be a normal win32 app but now
the server gets rebooted on a scheduled basis and no one may login to it
for a while.
So I want to move the application to a service application. Following
the delphi 7 manual, I got the application written fairly quickly and
got the debugging to work.
However when I try to use a TStringlist.LoadFromFile( aQueryListFile ) I
get an exception that has concatenated the WINSYSDIR to the path I
passed to the method.
If I pass in "d:\delphi projects\tickerdata\querylist.txt", the
exception I get back is "Cannot open file
"c:\windows\system32\"d:\delphi projects\tickerdata\querylist.txt"". The
filename, directory name, or volume label syntax is incorrect"
Am I not looking at this design the right way?
The querylist.txt file is simply a list of SQL filenames. The
querylist.txt file and the SQL files all reside in the same directory as
the new service application.
I turned on debug DCU's and the path I'm building and passing is correct
all the way into the FileOpen method in SysUtils which passes it along
to the win32 api.
Any ideas?