++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please Read The Disclaimer At The Bottom Of This Email
++++++++++++++++++++++++++++++++++++++++++++++++++++++

Another option is to build the query into a database function/procedure (or 
whatever this kind of objects might be called in Sybase)
The function/procedure would run the query and store the result into a 
temporary table within the Remedy database.
The active link would first call the stored function/procedure and then read 
the result from the temporary table.
If there is an error, it will be handled within the stored procedure and the 
set field from temporary table will then simply return no records.

The stored procedure would perhaps need to have a GUID as an input parameter so 
that when the active link searches the temporary table, it knows which entries 
to look for.
You may even pass the query as another input parameter to the stored procedure. 
Have done it in ORACLE, but do not know if Sybase allows this.

Hope this helps.

Jiri Pospisil

IT Services
LCH.Clearnet



-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of L G Robinson
Sent: 03 February 2009 14:51
To: [email protected]
Subject: Trapping SQL error in an active link

Hi Folks,

I have a problem with an active link set field action that
utilizes an SQL statement. The problem stems from the fact that
the SQL command is issued against a database table that is
maintained by another group. Occasionally, they will update the
table in the middle of the day, causing the table to briefly
cease to exist or lose it's permissions. When this happens, the
active link fails with one of the following error messages:

ARERR [552] Failure during SQL operation to the database:
E911..E911Remedy not found. Specify owner.objectname or use
sp_help to check whether the object exists.

ARERR [552] Failure during SQL operation to the database:
SELECT permission denied on object E911Remedy, database E911,
owner dbo (Sybase 10330)

This data is not critical to the normal functioning of the
application, so I am looking for a solution that allows me to
"ignore" this error in the active link. As far as I can tell, I
can control what happens if "no requests match" and if "multiple
requests match", but there is no way to trap the SQL error
condition and choose to ignore it.

About the only thing I have been able to come up with so far is
to run a cron job periodically that will check for the existence
of the table and the correct permissions. The cron job could then
set some external flag in the file system or call an API program
to set some internal global within my application. Then I could
check the global or the external flag in an active link before
invoking the SQL call. Seems overly complicated and convoluted to
me.

Does anyone have a better approach?

ARS: 5.01.02 patch 1313 on Solaris 2.8
Sybase: 12.5.2/EBF 11790 on Solaris 2.8


Thanks.
Larry


Larry Robinson                                   [email protected]
Office of Information Technology
NC State University                              919-515-5432 Voice
Raleigh, NC  27695-7109                          919-513-1893 FAX

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are"

*************************************************************************************************

This email is intended for the named recipient(s) only. Its contents are  
confidential and may only be retained by the named recipient(s) and may only be 
copied or disclosed with the consent of LCH.Clearnet Limited.   If you are not 
an intended recipient please delete this e-mail and notify 
[email protected].

The contents of this email are subject to contract in all cases, and 
LCH.Clearnet Limited makes no contractual commitment save where confirmed by 
hard copy.  LCH.Clearnet Limited accepts no liability, including liability for 
negligence, in respect of any statement in this email.

LCH.Clearnet Limited, Registered Office: Aldgate House, 33 Aldgate High Street, 
London EC3N 1EA.    Recognised as a Clearing House under the Financial Services 
& Markets Act 2000. Reg in England No.25932 
Telephone: +44 20 7426 7000              Internet: http://www.lchclearnet.com

*************************************************************************************************

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are"

Reply via email to