• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

NWlib

Hello.

I using NWlib and need fast help with this.

This example only deletes one job (first) I need help to make it delete ALL job in queue.


var  
 tempList : TStringList ;
 queueJobInfo : TNWQueueJobInfo ;
 serverConn : TNWConnHandle ;
 queueName : string ;
begin    
 serverConn := getPrimaryServerID ;
 queueName := 'laser1' ;
 templist := TStringList.create ;
  if getQueueJobList(serverConn,queueName,tempList) then
     begin
         queueJobInfo.nServer := serverConn ;
         queueJobInfo.cQueue := queueName ;
         queueJobInfo.jobID := TNWQueueJobID(tempList.objects[0]) ;
         if deleteQueueJob(queueJobInfo) then
          //okBox('Queue Job Deleted!') ;
          MessageDlg('Queue Job Deleted!', mtConfirmation, [mbOk], 0)          
     end;
  tempList.free ;
end;
0
Dark_King
Asked:
Dark_King
1 Solution
 
pcsentinelCommented:
just put a for loop around

queueJobInfo.jobID := TNWQueueJobID(tempList.objects[0]) ;
 

i.e. for li:=0 to pred(templist.objects.count) do
begin
         queueJobInfo.jobID := TNWQueueJobID(tempList.objects[li]) ;
         deleteQueueJob(queueJobInfo)
end;

regards
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now