Publishing issue: return code 120 was returned from the server.
Hi
I'm working on an issue when attempting to publish a crystal report using the sap toolbar. When I try to publish I am seeing the following error
An error occurred while saving and/or publishing. The return code 120 was returned from the server.
Does anyone know what this return code means or where I can look it up?
Thanks
Daniel
Hi Alexander,
Looks like you are encountering the same issue as us. The issue seems to be just being able to save the report to bw.
We are on sp2 fix pack 2.3 but experienced this behavior on sp2 as well
We tried a few tests against the server with sp2 installed
Client machine 1 # older version (just base install)
Configuration
Bobj client 12.1.0.882
crystal reports 2008 sp 1 12.1.0.892
sap ik 12.1.0.890
Behavior
-open a report in bw and preview in crystal - ok
-open a report preview and save report in bw using same name - ok
-create a folder under sap bw role using save as dialog box that comes up when selecting save as on the sap toolbar - ok
-open a report preview and save report under different name - ok
- create a new report and save ok
Client machine 2 # same version as server with sp2 installed
Configuration 2 bobj 3.1 sp2 fix pack 2.3
Bobj client 12.2.3.467
crystal reports 2008 sp 1 12.2.3.467
sap ik 12.2.3.467
Behavior
-open a report in bw and preview in crystal - ok
-open a report preview and save report in bw using same name - ok
-create a folder under sap bw role using save as dialog box that comes up when selecting save as on the sap toolbar - ok
-open a report preview and save report under different name I get the 120 error
- create a new report and save I get the 120 error
We ran rfc traces, authorization traces and found nothing.
Our support ticket is with the SAP BW team now and we are waiting to work with them. I will update the thread as we find more information.
Thanks,
Daniel
Similar Messages
-
sys.webforms.page request manager server error exception:An unknown error occured while processing the request on server. The status code returned from the server was:0 We got this response(In firebug console) when we try to click on link (after leave webpage for 3 minuts ideal) which is AJAX based. Please reply ASAP because its urgent.
Hi SP,
Please check if the following web config appSettins value settings from SSRS server could fix the issue (Note, back up your original web config file before any modification).
http://stackoverflow.com/questions/10911610/ssrs-webpage-error-status-code-500
http://srinivasbn.blogspot.in/2013/09/syswebformspagerequestmanagerservererro.html
http://connect.microsoft.com/SQLServer/feedback/details/782155/ssrs-2012-failed-with-win32-error-0x03e3
If you have more questions about the SSRS error logs related to this issue, you can post in the SSRS forum for a better assistance with more experts.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices
Thanks
We are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Hi,
I renewed my Offline Root CA and now trying to publish the CRL to AD on my Sub Issuing CA with the Certutil -dspublish command, however I get a 'Certutil: A referral was returned from the server' error. Kinda makes sense cause the Offline Root CA is
not on the network, so then how do I publish my renewed CRL to AD given this?
Thanks for your help! SdeDotLooks like your CRL do not include Active Directory container specification and certutil don't know where to publish the CRL.
Does root CA define LDAP url in CDP extension? If not, then you don't need to publish CRL in Active Directory, because no one will use it.
Vadims Podāns, aka PowerShell CryptoGuy
My weblog: en-us.sysadmins.lv
PowerShell PKI Module: pspki.codeplex.com
PowerShell Cmdlet Help Editor pscmdlethelpeditor.codeplex.com
Check out new: SSL Certificate Verifier
Check out new:
PowerShell File Checksum Integrity Verifier tool. -
Hi All,
I am getting error "Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"
in one of my Test Environment when trying to run the SSRS 2012 report from report manager.
Any clue why it is happening.
Thanks Shiven:) If Answer is Helpful, Please VoteHi All,
Upon investigation found that there was no space (0 Byte is available) in E drive where underlying SQL DB is residing.
Once I cleared the space, report started working and above error was not displaying.
Thanks Shiven:) If Answer is Helpful, Please Vote -
When I run the report on production I got the following error message:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the
request on the server. The status code returned from the server was: 12019
It hasn’t happen on Dev and Test before.
I googled, The error is described as:
12019 ERROR_INTERNET_INCORRECT_HANDLE_STATE
The requested operation cannot be carried out because the
handle supplied is not in the correct state.
But I cannot find the solution for that.
Has it happend to you before? How to solve that?Same behaviour here, Sharepoint 2013 with SSRS in integrated mode
Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status
code returned from the server was: 12019 -
Cisco Agent Error - 'A referral was returned from the server.'
Running agent 8.0.2.9 on Windows 7.
I have one person that is having trouble launching the agent software.
They are getting a popup that says, 'A referral was returned from the server.'
As of yesterday they were having no issues.
So fare we have tried the following.
Rebooted computer.
Uninstalled / reintalled agent.
Nothing has worked so far.Hi all,
I have Adam's case (afarabaugh) and the workaround is working. But it is interesting to note that this started on the same day for more than one customer. There are two things which come to mind:
--Certificate expired (ruled out for Adam's case)
--Microsoft released an OS update on that day?
@ke-mccormick: can you try setting the system clock on the PC to the day before the issue started? Let me know how that goes.
Any more information you can think of would help in isolating the issue.
Cheers,
Abhiram Kramadhati -
Return code 471 is returned from the server while saving a crystal report
Hi All,
The return code 471 is returned from the server while saving a crystal report.
Could some one give me a solution how to overcome this problem and to save my crystal report.
Thanks
JitenHi Jitendra,
request you to provide the complete error message along with the work-flow to reproduce the error and the version of both the Crystal Reports Designer and Enterprisee installed on the server.
Regards,
Jayendra. -
A referral was returned from the server - car camcorder f210
When i try to install the software that came with the F210 car cam it brings up a message "A referral was returned from the server" before it even attempts to install.
Found the fix. Go to HP support and to the driver download page. Navigate down to the Security item and select the Simplepass Identity Protection software package (latest version) and install it. Worked fine for me.
-
Urgent: Failed to get the object returned from the server
Hi there,
I'm debugging someone's code which make use of RMI to implement the client/server.
I found that when the client request the object from the server, the server return the object properly. But on the client side, it returned "java.io.EOFException". Don't know how to resolve it. Pls HELP !!
Thanks.
-Maggie
==============
Here is the output:-
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.EOFException
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:343)
at java.io.ObjectInputStream.readInt(ObjectInputStream.java:1980)
at javax.swing.ImageIcon.readObject(ImageIcon.java:371)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at java.util.Hashtable.readObject(Hashtable.java:792)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream.java:2214)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java:2263)
at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:519)
at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1412)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:300)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:134)
at com.ptec.rms.app.olap.modelbuilder.OlapMBServiceImpl_Stub.getPanel(Unknown Source)
at com.ptec.rms.app.sc.SystemConsoleDesktop.changeService(SystemConsoleDesktop.java:141)at least you have the benefit of the code to work with! :)
-
I get the following message soon after 120 seconds. Report query returns the full data set in SSMS withing 25 seconds.
This is a fairly a large report. I get this same error messages many of my large data reports.
Report server version 11.0.5058.0 on a VMware 2 GHz 4 core, 64GB RAM and Windows 2012 R2 (64 bit)
DB Server version Standard Edition (64-bit) 11.0.5058.0 on a VMware 2 GHz 8 core, 96GB RAM and Windows 2012 R2 (64 bit)
library!ReportServer_0-2!15ec!02/24/2015-14:29:07:: i INFO: Using folder C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\RSTempFiles for temporary files.
webserver!ReportServer_0-2!15ec!02/24/2015-14:29:17:: i INFO: Processed report. Report='/Head Office/UAE/RSH/Free Stock Report - Item wise', Stream=''
rshost!rshost!1404!02/24/2015-14:29:46:: e ERROR: WriteCallback(): failed to write in write callback.
rshost!rshost!1404!02/24/2015-14:29:46:: e ERROR: Failed with win32 error 0x03E3, pipeline=0x00000006101063B0.
rshost!rshost!1684!02/24/2015-14:29:46:: e ERROR: HttpPipelineCallback::SendResponse(): failed async writing response.
rshost!rshost!1684!02/24/2015-14:29:46:: e ERROR: Failed with win32 error 0x03E3, pipeline=0x00000006101063B0.
httpruntime!ReportManager_0-1!1684!02/24/2015-14:29:46:: e ERROR: Failed in BaseWorkerRequest::SendHttpResponse(bool), exception=System.Runtime.InteropServices.COMException (0x800703E3): The I/O operation has been aborted because of either a thread exit or an application request. (Exception from HRESULT: 0x800703E3)
at Microsoft.ReportingServices.HostingInterfaces.IRsHttpPipeline.SendResponse(Void* response, Boolean finalWrite, Boolean closeConn)
at ReportingServicesHttpRuntime.BaseWorkerRequest.SendHttpResponse(Boolean finalFlush)
library!ReportManager_0-1!1684!02/24/2015-14:29:46:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: RsWorkerRequest::FlushResponse., Microsoft.ReportingServices.Diagnostics.Utilities.ReportServerHttpRuntimeInternalException: An internal or system error occurred in the HTTP Runtime object for application domain ReportManager_MSSQLSERVER_0-1-130692470239287110. ---> System.Runtime.InteropServices.COMException (0x800703E3): The I/O operation has been aborted because of either a thread exit or an application request. (Exception from HRESULT: 0x800703E3)
at ReportingServicesHttpRuntime.BaseWorkerRequest.SendHttpResponse(Boolean finalFlush)
at ReportingServicesHttpRuntime.RsWorkerRequest.FlushResponse(Boolean finalFlush)
--- End of inner exception stack trace ---;
I get the following error in visual studioHi Jinantha Perera,
According to the screenshot, when you preview the report, you got System.OutOfMemoryException error.
Based on the error message, this issue occurs when the computer does not have sufficient memory to complete the requested operation. In order to get rid of the problem, please refer to the following steps:
Add sufficient physical memory to the computer
Schedule reports to run at off-hours when memory constraints are lower
Adjust the MemoryLimit setting accordingly
(Note: When you render a report through the Reporting Services Web service, the Reporting Services Web service obtains the MemoryLimit setting from the Machine.config file. However, a scheduled report is rendered by the Report Server Windows service.
The Report Server Windows service obtains the MemoryLimit setting from the RSReportServer.config file)
Reporting services has a MemoryThreshold, which specifies a percentage ofWorkingSetMaximum that defines the boundary between high and medium pressure scenarios, if you rendering large amount records, you could also configure settings that control memory
allocation for the report server include WorkingSetMaximum, WorkingSetMinimum,MemorySafetyMargin, and MemoryThreshold. Configuration settings are specified in the RSReportServer.config file.
For more information about "System.OutOfMemoryException" error and Configuring Available Memory for Report Server, please refer to:
http://support.microsoft.com/kb/909678
https://msdn.microsoft.com/en-us/library/ms159206%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
How can i find an excel file deleted from the server
In our office we all have access to the main server. Recently a document that we need was deleted from the server. It's not in the trash. Can and how would we be able to find and recover this deleted document? Specifically I am looking for an excel document, and I already checked the recent docs on excel.
thanks!Have the admin for the server restore the file from the backup
-
T.Code for issues return by the user after month closing
Dear SAPient's,
Give us the transaction facility available in SAP to account the issues
return by the user after month closing.
regards,
Bijay JhaDear SAPient's,
Actually I want to know that when the Goods Issued and from that some goods are returned back due to any reason.
I want to know Is there any T.Code from which i can get full details of Goods which is returned after Issuing in one month.
Warm Regards,
Bijay Kumar Jha -
Not returning from the native code
Hi,
I am trying to access the native code using java applet. My java code seems to load the DLL(created using the VC++ 6.0) properly. Then when i call the native method called crypto, it does not seem to return from the nayive code . I am signing the applet and putting it a signed jar .Any suggestion is appreciated. I mite be wrong in the design too ...pleas ehelp. I am pasting the java code and the C code.
cryptoJNI.java
import java.awt.*;
import java.io.*;
import java.lang.*;
import java.applet.*;
public class cryptoJNI extends Applet {
String uname=null;
String b=null,ret=null;
String a=null;
public void init(){
System.out.println("in init");
public void dll_load(){
b="before dll";
System.loadLibrary("Msgimpl");
a="after dll load";
private native String crypto(String store);
public void paint(Graphics g) {
g.setColor(Color.blue);
g.setColor(Color.magenta);
load_dll();
g.drawString(b, 5, 5);
g.drawString(a, 15, 15);
g.drawString("first call const", 25, 25);
cryptoJNI app = new cryptoJNI();
ret=app.crypto("My");
g.drawString(ret, 75, 75);
g.drawString("Signed 11", 120, 80);
stop();
CryptoJNI.c
#define WIN32WINNT 0x0400
#include <windows.h>
#include <jni.h>
#include <wincrypt.h>
#define MY_ENCODING_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING)
#include "cryptoJNI.h"
BOOL APIENTRY DllMain(HANDLE hModule,
DWORD dwReason, void** lpReserved) {
return TRUE;
JNIEXPORT void JNICALL
Java_CryptoJNI_crypto(JNIEnv * jEnv,jobject obj,jstring jstore) {
// char name[256];
const char *msg;
msg = (*jEnv)->GetStringUTFChars(jEnv, jstore,0);
//printf("Before context\n");
//(*jEnv)->ReleaseStringUTFChars(jEnv, jstore,msg);
return (*jEnv)->NewStringUTF(jEnv, msg);
In my applet, i have some debugging statements that helps me verify that the Msgimpl.dll loads properly. When i invoke the app.crypto() it just "hangs". Please help
Thanks,
VivekHi,
This is the exception that i am getting?? my cryptoJNIImp.c is is in the same directory as the my java file,c:\vivek work\signedcode. and i have added this to my path env variable...If u see the output, it executes the init() and then loads the Msgimpl.dll. So its got nothing do with loading a DLL. Any pointers on this..
in init
before loading dll
After loading dll
java.lang.UnsatisfiedLinkError: crypto
at cryptoJNI.crypto(Native Method)
at cryptoJNI.paint(cryptoJNI.java:65)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source) -
My iphone 4S has problem in making and receiving the calls. While making the call , call fails and netwrok disappears. Like wise no voice is heard for incoming calls. This happened after return from the overseas travel.
Hello SamSax
Check out the assist page below for troubleshooting call connectivity.
Calls and connection issues
http://www.apple.com/support/iphone/assistant/calls/
Thanks for using Apple Support Communities.
Regards,
-Norm G. -
I am currently testing our website with CF11. It is currently working with CF8 however after migrating it to a new server running CF11 I have encountered the following error.
The value returned from the load function is not of type numeric.
The error occurred in
D:/Applications/CFusion/CustomTags/nec/com/objects/address.cfc: line 263
Called from D:/Applications/CFusion/CustomTags/nec/com/objects/contact.cfc: line 331
Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 510
Called from D:/Applications/CFusion/CustomTags/nec/com/objects/user.cfc: line 1675
Called from D:/website/NECPhase2/action.validate.cfm: line 54
261 : <cfif isNumeric(get.idCountry)>
262 : <cfset rc = this.objCountry.setID(get.idCountry)>
263 : <cfset rc = this.objCountry.load()>
264 : </cfif>
265 : <cfset this.sPostcode = get.sPostcode>
Have there been any changes between CF8 and CF11 that could cause this error?
Does anyone have ideas?This is the code in file object file country.cfc (nec.com.objects.country):
<cfcomponent displayname="Country object" hint="This is a Country object, it allows you to access and set values in the Country.">
<!---
// Construct this object
--->
<cfset this.objFunctions = CreateObject( 'component', 'nec.com.system.functions' )>
<cfscript>
this.idCountryID = 0;
this.sCountryName = "";
this.sISOCode = "";
this.sDHLCode = "";
this.iErrorID = "";
</cfscript>
<!---
// The following functions are the setters and getters. offering us a better way to get
// at the contents of the object
--->
<!---
// Getters
--->
<cffunction name="getID" displayname="Get ID" returntype="numeric" output="false" hint="This returns the ID of the current item.">
<cfreturn this.idCountryID>
</cffunction>
<cffunction name="getsCountryName" displayname="Get sCountryName" returntype="string" output="false" hint="This gets the sCountryName value of this item.">
<cfreturn this.sCountryName>
</cffunction>
<cffunction name="getsISOCode" displayname="Get sISOCode" returntype="string" output="false" hint="This gets the sISOCode value of this item.">
<cfreturn this.sISOCode>
</cffunction>
<cffunction name="getsDHLCode" displayname="Get sDHLCode" returntype="string" output="false" hint="This gets the sDHLCode value of this item.">
<cfreturn this.sDHLCode>
</cffunction>
<cffunction name="iError" displayname="Get iError" returntype="numeric" output="false" hint="This returns the iError of the current item.">
<cfreturn this.iError>
</cffunction>
<!---
// Setters
--->
<cffunction name="setID" displayname="Set ID" returntype="boolean" output="false" hint="This sets the ID value of this item.">
<cfargument name="idCountryID" required="true" type="numeric" displayname="ID" hint="The ID to use.">
<cfset this.idCountryID = arguments.idCountryID>
<cfreturn true>
</cffunction>
<cffunction name="setsCountryName" displayname="Set sCountryName" returntype="boolean" output="false" hint="This sets the sCountryName value of this item.">
<cfargument name="sCountryName" required="true" type="string" displayname="sCountryName" hint="The sCountryName to use.">
<cfset this.sCountryName = arguments.sCountryName>
<cfreturn true>
</cffunction>
<cffunction name="setsISOCode" displayname="Set sISOCode" returntype="boolean" output="false" hint="This sets the sISOCode value of this item.">
<cfargument name="sISOCode" required="true" type="string" displayname="sISOCode" hint="The sISOCode to use.">
<cfset this.sISOCode = arguments.sISOCode>
<cfreturn true>
</cffunction>
<cffunction name="setsDHLCode" displayname="Set sDHLCode" returntype="boolean" output="false" hint="This sets the sDHLCode value of this item.">
<cfargument name="sDHLCode" required="true" type="string" displayname="sDHLCode" hint="The sDHLCode to use.">
<cfset this.sDHLCode = arguments.sDHLCode>
<cfreturn true>
</cffunction>
<!---
// Clear, to empty out the contents of this object
--->
<cffunction name="clear" displayname="Clear items Details" returntype="boolean" output="false" hint="Clears out all of the items details.">
<cfscript>
this.sCountryName = "";
this.sISOCode = "";
this.sDHLCode = "";
this.iErrorID = "";
</cfscript>
<cfreturn true>
</cffunction>
<!---
// The following functions deal with the load, save and deleting of objects
--->
<!---
// Load
--->
<cffunction name="load" displayname="Load items details" returntype="numeric" output="false" hint="This loads in all the information about an item.">
<cfset rc = this.clear()>
<!---
// First of all we need to get the name of the data source we are going to be using
--->
<cfscript>
objDS = CreateObject("component","nec.com.system.settings");
sDatasource = objDS.getDatasource();
</cfscript>
<!---
// Check to see if it exists
--->
<cftry>
<cfquery name="checkID" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("load: checkID: '#this.idCountryID#' #cfcatch.detail#");
</cfscript>
<cfset this.iErrorID = iErrorID>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif not checkID.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
if(isDefined("session.afr")){
whichOne = "#session.afr.getsAFRNumber()#";
} else {
whichOne = "";
iErrorID = objError.addError("A Country with that id doesn't exists.[#this.idCountryID#][#whichOne#]");
</cfscript>
<cfset this.iErrorID = iErrorID>
<cfreturn iErrorID>
</cfif>
<!---
// If we got past all then then load in the details
--->
<cftry>
<cfquery name="get" datasource="#sDatasource#">
SELECT idCountryID, RTRIM(sCountryName) as sCountryName, RTRIM(sISOCode) as sISOCode, RTRIM(sDHLCode) as sDHLCode
FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("load: get: #cfcatch.detail#");
</cfscript>
<cfset this.iErrorID = iErrorID>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfset this.idCountryID = get.idCountryID>
<cfset this.sCountryName = get.sCountryName>
<cfset this.sISOCode = get.sISOCode>
<cfset this.sDHLCode = get.sDHLCode>
<cfset this.iErrorID = "">
<cfreturn true>
</cffunction>
<!---
// Save
--->
<cffunction name="save" displayname="Save items Details" returntype="numeric" output="false" hint="Saves (to some source) the current details for the ID of the item.">
<!---
// First of all we need to get the name of the data source we are going to be using
--->
<cfscript>
objDS = CreateObject("component","nec.com.system.settings");
sDatasource = objDS.getDatasource();
</cfscript>
<!---
// Now check to see if ithat ID exists
--->
<cftry>
<cfquery name="checkID" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("save: checkID: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<!---
// If it doesn't exist, then add the record, otherwise update the record
--->
<cfif not checkID.recordCount>
<cfreturn this.add()>
<cfelse>
<cfreturn this.update()>
</cfif>
</cffunction>
<!---
// Add
--->
<cffunction name="add" displayname="Add Country" returntype="numeric" output="false" hint="This adds a Country.">
<!---
// Check to see if that a different item isn't already using the same unique details
--->
<cftry>
<cfquery name="checkUnique" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#'
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("add: checkUnique: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif checkUnique.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("A Country with that name or ISO code already exists. idCountryID=#checkUnique.idCountryID#");
</cfscript>
<cfreturn iErrorID>
</cfif>
<cftry>
<cfquery name="add" datasource="#sDatasource#">
SET nocount on
INSERT INTO tblCountry(sCountryName, sISOCode, sDHLCode)
VALUES('#this.objFunctions.scrubText(this.sCountryName)#','#this.objFunctions.scrubText(t his.sISOCode)#','#this.objFunctions.scrubText(this.sDHLCode)#')
SELECT @@identity as autoID
SET nocount off
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("add: add: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfreturn add.autoID>
</cffunction>
<!---
// Update
--->
<cffunction name="update" displayname="Update Country" returntype="numeric" output="false" hint="This updates a Country record.">
<!---
// Check to see if that a different item isn't already using the same unique details
--->
<cftry>
<cfquery name="checkUnique" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE (sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#'
OR sISOCOde = '#this.objFunctions.scrubText(this.sISOcode)#')
AND idCountryID <> #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("update: checkUnique: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif checkUnique.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("Another Country with that name already exists. idCountryID=#checkUnique.idCountryID#");
</cfscript>
<cfreturn iErrorID>
</cfif>
<!---
// Attempt to update the record to the datasource
// if this fails for any reason then we submit an error message
// to the error component and return the ID of the error
--->
<cftry>
<cfquery name="update" datasource="#sDatasource#">
UPDATE tblCountry
SET sCountryName = '#this.objFunctions.scrubText(this.sCountryName)#',
sISOCode = '#this.objFunctions.scrubText(this.sISOCode)#',
sDHLCode = '#this.objFunctions.scrubText(this.sDHLCode)#'
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("update: update: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfreturn this.idCountryID>
</cffunction>
<!---
// Delete
--->
<cffunction name="delete" displayname="Delete Country" returntype="numeric" output="false" hint="This deletes a Country record.">
<!---
// First of all we need to get the name of the data source we are going to be using
--->
<cfscript>
objDS = CreateObject("component","nec.com.system.settings");
sDatasource = objDS.getDatasource();
</cfscript>
<!---
// Now check to see if ithat ID exists
--->
<cftry>
<cfquery name="checkID" datasource="#sDatasource#">
SELECT idCountryID
FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("delete: checkID: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif not checkID.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("A Country with that id doesn't exists, delete failed.");
</cfscript>
<cfreturn iErrorID>
</cfif>
<!---
// Now check to see if there are any dependancies, if so we can't delete the item
--->
<cftry>
<cfquery name="checkDependancies" datasource="#sDatasource#">
SELECT idCountry
FROM tblAddress
WHERE idCountry = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("delete: checkDependancies: idCountry: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfif checkDependancies.recordCount>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("That Country is being used by an address, delete failed.");
</cfscript>
<cfreturn iErrorID>
</cfif>
<!---
// Now attempt to remove the record.
// if this fails for any reason then we submit an error message
// to the error component and return the ID of the error
--->
<cftry>
<cfquery name="delete" datasource="#sDatasource#">
DELETE FROM tblCountry
WHERE idCountryID = #this.idCountryID#
</cfquery>
<cfcatch>
<cfscript>
objError = CreateObject("component","nec.com.system.errors");
iErrorID = objError.addError("delete: delete: #cfcatch.detail#");
</cfscript>
<cfreturn iErrorID>
</cfcatch>
</cftry>
<cfreturn this.idCountryID>
</cffunction>
</cfcomponent>
Maybe you are looking for
-
what is the purpose of alt-rt.jar in jdk1.6.0_20/jre/lib -- 64bit thanks
-
Hi, I was downloading Skype for mac last night, and now my safari isn't working correctly (has a lot of popups and and words are hyperlinked on my webpages I pull up now. I think I have the 'DownLite' trojan but I am unsure of how to get rid of it. I
-
Where can i find sms's stored in PC?
Hi! I recently formatted the memory card and reseted the phone, with this "clever" action i lost all my contacts. But, before I did that, I synchronized the phone with Nokia Photos, and i have all the sms's there. I also copied all contents of the ca
-
Keyboard Shortcut to Select Next Tab not working
Hello. Somewhat similar to this issue (http://discussions.apple.com/message.jspa?messageID=11414081#11414081), the keyboard shortcut to select the previous / next tab in Safari isn't working in (my) 10.6.3. What is it with this system, or what fundam
-
Can I download Lightroom 1.0
I have lost my installation CD but I registered the product at the time and I have the serial number. Can I download the product instead? My Lightroom is freezing all the time and I need to reinstall it (did that some years ago when this problem occu