Hi guys. I am trying to schedule som data processing inside nav W1 4.0 SP2 and I thought to use NAS for this purpose. So I Installed the NAS that comes along with the nav installation and configured it in mmc as follows:
Database Server Name=<blank>, because I,ll use a local database
Database= <full path to the database>
Company Name= <The company I want to use inside db>
Start-Up Parameter=<SBA>
Net Type=<TCP/IP>
Object Cache Size (KB)=<8000>
Then I added a line of code in CU 1 which will run my test CU. The line loooks like this:
SBAHandler.RUN;
ParamStr := UPPERCASE(NASID);
REPEAT...
My CU SBAHandler looks like this:
Documentation()
OnRun()
{IF ISCLEAR(NavisionTimer) THEN
CREATE(NavisionTimer);
NavisionTimer.Interval := 5000;
NavisionTimer.Enabled := TRUE;}
IF ISCLEAR(CPTimer) THEN
CREATE(CPTimer);
IntervalInSek := 5;
CPTimer.Start(IntervalInSek);
NavisionTimer::Timer(Milliseconds : Integer)
MESSAGE('Time is %1',TIME);
NavisionTimer::TimerError(ErrorString : Text[1024])
CPTimer::CountDown(VAR intNextInterval : Integer)
intNextInterval := IntervalInSek * 1000;
MESSAGE('Clock is %1',TIME);
The cu is sigle instance and if I run it manualy I get the message every 5 sec, with both timers 'Navision Timer 1.0'.Timer and 'CP Timer'.cCountDown it works ok. But when I close the database and theck the Event Viewer to see the messages, there is none. I get just warnings every 30 sec, saying that with the startup parameter <SBA> no service can be run. Looks like the timer event in my CU doesnt fire, because if I add the message in my CU in the OnRun trigger insted of in the CPTimer, I do get the message in the event log, but just every 30 sec, which I gues is the windows interval that runs the service, and that is not what I want. I have 10 application servers in licence. What could be wrong. Any suggestion welcome. Thanks.
Comments
Read the document called 'w1w1ATAS.pdf' in the doc folder on your product cd, and see if you can find the section that covers how to set up the NAS user, the one that runs the service.
RIS Plus, LLC
viewtopic.php?t=23939
second
the error message "saying that with the startup parameter <SBA> no service can be run" means, that you has as Startupparameter "SBA" but in function NASHandler on CU1 there is no snippes of code where the SBA is used. And i hope that you use the local database without server only for tests. Because on a local database can only one connection established.
So when you do following in function NasHandler you have no problems.
Regards.
Are you configuring your NAS to log into a Native Database, *fdb file, without going through a Navision Database server?
If so, the NAS will not be able to log into that database when you are logged in using a client.
If you don't logon using the Navision Database server or SQL then you can only have one connection to the database at a time.
Hope this helps,
Willy