SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
COM+ Object questions

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
COM+ Object questions
Author Message
thuan



Joined: 29 Aug 2002
Posts: 22

Post COM+ Object questions Reply with quote

I received a return code of -3, doing a GetJobProperty call (using the 24x7 Remote Control COM+ Object)
on the "Disabled" for a job. Do you have a list of possible error codes, not necessarily just for
this function call.

Also, I'm retrieving the "MONTHLY_TYPE" property for jobs. There seems to be a discrepency according
to the documentation. A monthly job scheduled to run on the first day of the month returns a
MONTHLY_TYPE = "D", where the online help says it should return "T"
Visa versa is true. A monthly job scheduled to run on a certain day of the week, returns a
MONTHLY_TYPE = "T". I'm expecting MONTHLY_TYPE = "D"
I get same results from the example VB Client you have posted on your website, as with my application.
Can you verify?

Is the GetJobProperty function more "dynamic" then the "GetJobPropertyEx" function?
To illustrate,
1. Assume the DISABLED property returns "Y" from both functions for a given job.
2. I call "SetJobProperty" and change the value for a job to "N"
3. I then do a "GetJobProperty" call and it returns "N" for the job. However, "GetJobPropertyEx" still returns "Y"

I'm running v3.4.6 on Windows 2000 Pro

Thanks,
Thuan

Thu Jan 08, 2004 6:34 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: COM+ Object questions Reply with quote

Error codes are non-distinct and the same codes can be reused by different functions.
Please use the LastError property to get the detailed error description.

In this particular case the -3 error should have an error description like "Access denied! No permissions to view this job definition." This may happen for password-protected jobs having "full protection" or "execute only" protection levels.

As for the MONTHLY_TYPE, I think you are correct , D is for "scheduled by number", T is for "scheduled by day name."

GetJobPropertyEx is much more efficient when you need to retrieve several properties as it makes only one round trip to the server. If you need to retrieve only one property then there is no real difference. On the other hand, if you pull multiple properties at once then you need to do some parsing to break comma-separated list of returned values into individual values. In JavaScript this can be done using a single call to the split() function.
GetJobPropertyEx must return same values as GetJobProperty. I am not sure why you get different results.

I highly recommend to upgrade from 3.4.6 to a more recent version. First of all because it provides better error descriptions and the internal COM API implementation is improved. Secondary, it includes 2 new COM interfaces, one for ASP pages using VBScript and another for JavaScript. They implement basically the same interface as the main COM API you are using now in VB but allow better support for environments not using strong data types (e.g. variants only) and and/or not supporting passing function arguments by reference.

: I received a return code of -3, doing a GetJobProperty call (using the 24x7
: Remote Control COM+ Object)
: on the "Disabled" for a job. Do you have a list of possible error
: codes, not necessarily just for
: this function call.

: Also, I'm retrieving the "MONTHLY_TYPE" property for jobs. There
: seems to be a discrepency according
: to the documentation. A monthly job scheduled to run on the first day of the
: month returns a
: MONTHLY_TYPE = "D", where the online help says it should return
: "T"
: Visa versa is true. A monthly job scheduled to run on a certain day of the
: week, returns a
: MONTHLY_TYPE = "T". I'm expecting MONTHLY_TYPE = "D"
: I get same results from the example VB Client you have posted on your
: website, as with my application.
: Can you verify?

: Is the GetJobProperty function more "dynamic" then the
: "GetJobPropertyEx" function?
: To illustrate,
: 1. Assume the DISABLED property returns "Y" from both functions for
: a given job.
: 2. I call "SetJobProperty" and change the value for a job to
: "N"
: 3. I then do a "GetJobProperty" call and it returns "N"
: for the job. However, "GetJobPropertyEx" still returns
: "Y"

: I'm running v3.4.6 on Windows 2000 Pro

: Thanks,
: Thuan

Fri Jan 09, 2004 10:21 am View user's profile Send private message
thuan



Joined: 29 Aug 2002
Posts: 22

Post Re: COM+ Object questions Reply with quote

The LastError property always returns my user name. Is it used like
VB Errors? Where the last error raised remains until explicitly cleared
or another has occured?

: Error codes are non-distinct and the same codes can be reused by different
: functions.
: Please use the LastError property to get the detailed error description.

: In this particular case the -3 error should have an error description like
: "Access denied! No permissions to view this job definition."
: This may happen for password-protected jobs having "full
: protection" or "execute only" protection levels.

: As for the MONTHLY_TYPE, I think you are correct , D is for "scheduled
: by number", T is for "scheduled by day name."

: GetJobPropertyEx is much more efficient when you need to retrieve several
: properties as it makes only one round trip to the server. If you need to
: retrieve only one property then there is no real difference. On the other
: hand, if you pull multiple properties at once then you need to do some
: parsing to break comma-separated list of returned values into individual
: values. In JavaScript this can be done using a single call to the split()
: function.
: GetJobPropertyEx must return same values as GetJobProperty. I am not sure why
: you get different results.

: I highly recommend to upgrade from 3.4.6 to a more recent version. First of
: all because it provides better error descriptions and the internal COM API
: implementation is improved. Secondary, it includes 2 new COM interfaces,
: one for ASP pages using VBScript and another for JavaScript. They
: implement basically the same interface as the main COM API you are using
: now in VB but allow better support for environments not using strong data
: types (e.g. variants only) and and/or not supporting passing function
: arguments by reference.

Mon Jan 12, 2004 6:15 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: COM+ Object questions Reply with quote

It is a known issue. On some systems, the older versions of the COM object returned property values shifted by one, (e.g. Connected property returned Terminal, Terminal returned LastError, LastError retuened UserName and so on, sorry I do not remember the exact order). The problem is caused by a bug in the code compiler. This has been fixed in version 3.4.15. Please upgrade.

: The LastError property always returns my user name. Is it used like
: VB Errors? Where the last error raised remains until explicitly cleared
: or another has occured?

Tue Jan 13, 2004 9:15 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.