Hey all,
I have a BCB5 app that I installed to run as a service in NT. The app queries a database every 60 seconds to see if there are any reports scheduled to be run. The app runs fine if started the usual way. The app will start from the services snapin but the problem is, when it is started this way, it gives me an error saying "Report Not Found". Here's the code to run when started as service:
//find out if Scheduler was started as Service or with -s param
if(ParamStr(1)!=""
{
//start timer and change display
bttnMainStop->Enabled = true;
bttnMainStart->Enabled = false;
Memo1->Lines->Add(FormatDateTime("mm/dd/yyyy hh:mm:ss", Now()) + " - Report Scheduler Started"
WriteLog(FormatDateTime("mm/dd/yyyy hh:mm:ss", Now()) + " - Report Scheduler Started"
timerQueryTimer(TfrmMain::bttnMainStart);
timerQuery->Enabled = true;
}
This starts the timer, which just queries the database to see if anything is due to run. If so, it runs the report. Like I said, when the timer is started manually (by pressing a button) it's fine, but when I use this code to automate it, I get this error "Report Not Found". Any ideas? Thanks.
I have a BCB5 app that I installed to run as a service in NT. The app queries a database every 60 seconds to see if there are any reports scheduled to be run. The app runs fine if started the usual way. The app will start from the services snapin but the problem is, when it is started this way, it gives me an error saying "Report Not Found". Here's the code to run when started as service:
//find out if Scheduler was started as Service or with -s param
if(ParamStr(1)!=""
{
//start timer and change display
bttnMainStop->Enabled = true;
bttnMainStart->Enabled = false;
Memo1->Lines->Add(FormatDateTime("mm/dd/yyyy hh:mm:ss", Now()) + " - Report Scheduler Started"
WriteLog(FormatDateTime("mm/dd/yyyy hh:mm:ss", Now()) + " - Report Scheduler Started"
timerQueryTimer(TfrmMain::bttnMainStart);
timerQuery->Enabled = true;
}
This starts the timer, which just queries the database to see if anything is due to run. If so, it runs the report. Like I said, when the timer is started manually (by pressing a button) it's fine, but when I use this code to automate it, I get this error "Report Not Found". Any ideas? Thanks.