Job scheduling error : The return value was unknown. The process exit code was -1073741819. The step failed.

I am working in Sqlserver 2008 R2, SSIS 64 bit version
I am getting the below  error while scheduling the job in the development server  Database. 
The return value was unknown.  The process exit code was -1073741819.  The step failed.
The SSIS front end execution runs fine.
Have anyone  faced this issue before?

Hi Venkat,
If you already changed to 64bit and still doesn't work then create proxy account.. 
To create a proxy account
In Object Explorer, expand a server.
Expand SQL Server Agent.
Right-click Proxies and select New Proxy.
On the General page of the New Proxy Account dialog, specify the proxy name, credential name, and
description for the new proxy. Note that you must create a credential first before you create a proxy if one is not already available. For more information about creating a credential, see How
to: Create a Credential (SQL Server Management Studio) or CREATE CREDENTIAL (Transact-SQL).
Check the appropriate subsystem for this proxy.
On the Principals page, add or remove logins or roles to grant or remove access to the proxy account.
Thanks

Similar Messages

  • SQL 2012 - SSIS Error -The step did not generate any output. The return value was unknown. The process exit code was -1073741819. The step failed.

    Hi guys 
     Trying to run this package on SQL 2012 agent  and getting below error . No more details I could find so far.
    The step did not generate any output.  The return value was unknown.  The process exit code was -1073741819.  The step failed.
    About Package - Its connecting to different version (2000,2005,2008,2008R2,2012) servers and putting Jobs information into one Database table.  
    Any workaround or fix ?
    Thanks
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

    New package or one that used to work? Connecting how? How does it poll?
    On the surface it is an error from a memory space of the binary/non-managed code, so nothing can be really concluded based on what you decided to share with us.
    Arthur My Blog
    So Same package is working fine from my local machine which has SQL 2008 R2 and SQL 2012 installed. I am trying to push the package on server which has sql server 2012 Installed . 
    I don't see any error .
    I ran package manually from server using SQL Data tools and ran successfully...
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

  • SSIS fails with error : The process exit code was -1073741701

    Hello All,
    I am having issues with SSIS packages running from SQL agent job.
    The server we are running the job is used for SSIS and there are lot of other SSIS jobs that are running.
    We were able to run the job once successfully and the later runs are failing with the below error.(nothing has been changed) 
    The step did not generate any output.  The return value was unknown.  The process exit code was -1073741701.  The step failed.
    Nothing is being logged in the [catalog].[operations] or operation_messages view. When tuned the profiler ON we do not see the job trying to connect to SSISDB at all. I am assuming that the job is failing much before if does any thing.
    I have moved the package to a different server and ran it with the same proxy account and it works fine there.
    Any help or suggestion on this issue would be helpful.
    Thanks !

    Hi SQL_Help,
    You can run the job once successfully and the later runs are failing with the below error ran it as a Job. “The step did not generate any output.  The return value was unknown.  The process exit code was -1073741701.  The step failed.” It
    was really a generic error message with no information with it.
    We can use Process Monitor and Event Viewer to capture the detail error message. Then based on the error message to fix this issue.  The following similar issue is for your reference:
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2014/05/22/ssis-package-fails-with-error-the-step-did-not-generate-any-output-the-return-value-was-unknown.aspx
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Execute Process Task - Error :The process exit code was "2" while the expected was "0".

    I am designing a utility which will keep two similar databases in sync. In other words, copying the new data from db1 to db2  and updating the old data from db1 to db2.
    For this I am making use of the 'Tablediff' utility which when provided with server name, database, table info will generate .sql file which can be used to keep the target table in sync with the source table.
    I am using the Execute Process Task  and the process parameters I am providing are:
    WorkingDirectory : C:\Program Files (x86)\Microsoft SQL Server\90\COM
    Executable :      C:\SQL_bat_Files\SQL5\TC_CTI\customer.bat
    The customer.bat file will have the following code:
    tablediff -sourceserver "LV-SQL5" -sourcedatabase "TC_CTI" -sourcetable "CUSTOMER_1" -destinationserver "LV-SQL2" -destinationdatabase "TC_CTI" -destinationtable "CUSTOMER"  -f "c:\SQL_bat_Files\sql5\TC_CTI\sql_files\customer1" 
    the .sql file will be generated at:  C:\SQL_bat_Files\sql5\TC_CTI\sql_files\customer1.
    The Problem:
    The Execute Process Task is working fine, ie., the tables are being compared correctly and the .SQL file is being generated as desired. But the task as such is reporting faliure with the following error :
    [Execute Process Task] Error: In Executing "C:\SQL_bat_Files\SQL5\TC_CTI\package_occurrence.bat" "" at "C:\Program Files (x86)\Microsoft SQL Server\90\COM", The process exit code was "2" while the expected was "0". ]
    Some of you may suggest to just set the ForceExecutionResult = Success (infact this is what I am doing now just to get the program working), but, this is not what I desire.
    Can anyone help ?

    Jwelch,
    Thanks for the input,
    "Change the SuccessValue property of the Execute Process task from 0 to 2 (which means that you will get a failure if there are no differences, since TableDiff returns 0 in that case)."
               -- Not possible b'coz if there is no difference in the tables, which is also a possiblility, the job will fail.
    "FailTaskIfReturnCodeIsNotSuccessValue to FALSE (which means it won't fail regardless of the code returned)."
              -- Does this mean the job will never fail? Lets say the target table doesnt exist, then, by setting "FailTaskIfReturnCodeIsNotSuccessValue to FALSE " will the job fail? I guess my question is, how is what you've suggested different from setting "ForceExecutionResult = Success". Both the cases will show the task status "Success" even if there is an error.
    Is there a way to keep the property of job 'Failure' if there is any generic errors like target table not found or say, the path given for .sql file output is not valid etc.
    Thanks again,
    Little_Birdie.

  • Ssis execute process task error: process exit code was 1 while the expected was 0

    Hi Sir,
    in my SSIS Package(2012) i am using Execute Process Task which will call bat file.  bat file is located on UNC Path.i am having  the below script in the batch file.
     del \\servername\foldername\name.txt
     rcmd \\servername D:\name1.bat
     del \\servername\foldername\name2.txt
    xcopy \\servername\foldername\file.txt   \\server\foldername\outfilefolder
    i am getting the below error message:
    ssis execute process task error:  process exit code was 1 while the expected was 0
    i want know at what cases error exit code was 1?
    Thanks for your time.

    Hi prasad.alm,
    The error is generic and can be caused by various factors. Here are some suggestions for your reference:
    Manually run the executable to execute the batch file so that we can check whether the command lines in the batch file are correct or not.
    Check there are no duplicate/existing files in the destination folder.
    Try to run the package in 32-bit or 64-bit runtime mode.
    If the issue occurs when running a job, try to create a CmdExec type job step to call the excutable. If this job also fails, it might be an issue between executable and SQL Server Agent rather than the SSIS package itself.
    If the issue persists, enable logging for the package, and check if we can obtain more detailed error message for further analysis.
    Regards,
    Mike Yin
    TechNet Community Support

  • System.Exception: An error occurred during the Microsoft VSTO Tools 4.0 install (exit code was -2146762485).

    I have been trying to install a piece of software on 2 Windows 7 PCS called Rightfax...during installing I get the error below;
           System.Exception: An error occurred during the Microsoft VSTO Tools 4.0 install (exit code was -2146762485).
    It then gives me an error log of ;
    2015-04-23 14:43:03Z: Error: Unexpected problem occurred in task worker
           System.Exception: An error occurred during the Microsoft VSTO Tools 4.0 install (exit code was -2146762485).
              at CommonInstall.Tasks.InstallTask.LaunchInstall(String friendlyName, String exe, String args, Int32[] exitCodesToIgnore)
              at CommonInstall.Tasks.InstallVSTO.OnRun(ITaskFeedback feedback)
              at TaskWizard.Task.Run(ITaskFeedback feedback, Boolean recurse)
              at TaskWizard.TaskWorker.RunTasks()
              at TaskWizard.TaskWorker.OnDoWork(DoWorkEventArgs e)
    2015-04-23 14:43:03Z: Error: Problem in sequence or one of its pages
           System.Exception: An error occurred during the Microsoft VSTO Tools 4.0 install (exit code was -2146762485).
              at CommonInstall.Tasks.InstallTask.LaunchInstall(String friendlyName, String exe, String args, Int32[] exitCodesToIgnore)
              at CommonInstall.Tasks.InstallVSTO.OnRun(ITaskFeedback feedback)
              at TaskWizard.Task.Run(ITaskFeedback feedback, Boolean recurse)
              at TaskWizard.TaskWorker.RunTasks()
              at TaskWizard.TaskWorker.OnDoWork(DoWorkEventArgs e)
              at CommonInstall.PreparationWorker.OnDoWork(DoWorkEventArgs e)
              at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
    2015-04-23 14:43:03Z: Error: Problem in sequence or one of its pages
           System.Exception: An error occurred during the Microsoft VSTO Tools 4.0 install (exit code was -2146762485).
              at CommonInstall.Tasks.InstallTask.LaunchInstall(String friendlyName, String exe, String args, Int32[] exitCodesToIgnore)
              at CommonInstall.Tasks.InstallVSTO.OnRun(ITaskFeedback feedback)
              at TaskWizard.Task.Run(ITaskFeedback feedback, Boolean recurse)
              at TaskWizard.TaskWorker.RunTasks()
              at TaskWizard.TaskWorker.OnDoWork(DoWorkEventArgs e)
              at CommonInstall.PreparationWorker.OnDoWork(DoWorkEventArgs e)
              at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
    2015-04-23 14:43:03Z: Info: Page changed from 'WizardWorkerPage' to 'ResultPage' driven by result 'Next' and exception 'none'
    2015-04-23 14:44:06Z: Info: Page changed from 'ResultPage' to 'none' driven by result 'Next' and exception 'none'
    2015-04-23 14:44:06Z: Info: Work has not been completed; install state will not be saved.
    2015-04-23 14:44:06Z: Info: Reboot status = NotRequired
    2015-04-23 14:44:06Z: Info: Exitcode = 0
    2015-04-23 14:44:06Z: Info: Logging ended.
    I have installed this software succesfully on other machines previously.....

    Hi RyanWelsh78,
    This forum is discussing about Visual Stuido Tools for Office developing, your issue is related with the installing Rightfax add-in which is a third party product. As the reply from Eugene, you could contact Rightfax add-in developers for help.
    Thanks for your understanding.
    Best Regards,
    Edward
    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.
    Click
    HERE to participate the survey.

  • Call C# method from javascript in WebView and retrieve the return value

    The issue I am facing is the following :
    I want to call a C# method from the javascript in my WebView and get the result of this call in my javascript.
    In an WPF Desktop application, it would not be an issue because a WebBrowser
    (the equivalent of a webView) has a property ObjectForScripting to which we can assign a C# object containg the methods we want to call from the javascript.
    In an Windows Store Application, it is slightly different because the WebView
    only contains an event ScriptNotify to which we can subscribe like in the example below :
    void MainPage_Loaded(object sender, RoutedEventArgs e)
    this.webView.ScriptNotify += webView_ScriptNotify;
    When the event ScriptNotify is raised by calling window.external.notify(parameter), the method webView_ScriptNotify is called with the parameter sent by the javascript :
    function CallCSharp() {
    var returnValue;
    window.external.notify(parameter);
    return returnValue;
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = DoSomerthing(parameter);
    The issue is that the javascript only raise the event and doesn't wait for a return value or even for the end of the execution of webView_ScriptNotify().
    A solution to this issue would be call a javascript function from the webView_ScriptNotify() to store the return value in a variable in the javascript and retrieve it after.
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = ReturnResult();
    await this.webView.InvokeScriptAsync("CSharpCallResult", new string[] { result });
    var result;
    function CallCSharp() {
    window.external.notify(parameter);
    return result;
    function CSharpCallResult(parameter){
    result = parameter;
    However this does not work correctly because the call to the CSharpResult function from the C# happens after the javascript has finished to execute the CallCSharp function. Indeed the
    window.external.notify does not wait for the C# to finish to execute.
    Do you have any solution to solve this issue ? It is quite strange that in a Window Store App it is not possible to get the return value of a call to a C# method from the javascript whereas it is not an issue in a WPF application.

    I am not very familiar with the completion pattern and I could not find many things about it on Google, what is the principle? Unfortunately your solution of splitting my JS function does not work in my case. In my example my  CallCSharp
    function is called by another function which provides the parameter and needs the return value to directly use it. This function which called
    CallCSharp will always execute before an InvokeScriptAsync call a second function. Furthermore, the content of my WebView is used in a cross platforms context so actually my
    CallCSharp function more look like the code below.
    function CallCSharp() {
    if (isAndroid()) {
    //mechanism to call C# method from js in Android
    //return the result of call to C# method
    } else if (isWindowsStoreApp()) {
    window.external.notify(parameter);
    // should return the result of call to C# method
    } else {
    In android, the mechanism in the webView allows to return the value of the call to a C# method, in a WPF application also. But I can't figure why for a Windows Store App we don't have this possibility.

  • FindAndReplace What is the returned value

    I have found a function used in some NI sample code FindAndReplace() and it doesnt show as a teststand function. Anybody used it or know what the return values are and any optional parameters ?

    Rupert -
    In the TestStand expression language there is a SearchAndReplace function which returns the modified string. What is the code snippet, is it C, C++, expression?
    Scott Richardson (NI)
    SearchAndReplace(string, searchString, replacementString, , , , , )
    This function searches for and replaces one or more substrings with the replacementString.
    Parameter 1: A string in which to perform substring replacements.
    Parameter 2: The substring to find and then replace with the replacement string.
    Parameter 3: The replacement string.
    Parameter 4: An optional number that specifies the zero-based character index at which to begin searching. The default is 0.
    Parameter 5: An op
    tional Boolean that specifies whether to ignore character case when searching. The default is False.
    Parameter 6: An optional number that specifies the maximum number of occurrences of substring to replace. A value of -1 signals the function to replace all occurrences of the substring. The default is -1.
    Parameter 7: An optional Boolean that specifies whether to search the string in reverse. The default is False. If you pass True, the start index passed to parameter 3 specifies the zero-based index from the end of the string of the character at which to begin searching in reverse.
    Parameter 8: An optional number in which the function stores the number of substrings that it replaced.
    Returns: The modified string.
    Scott Richardson
    National Instruments

  • Not getting the return value of a program though it has no  errors

    public static String giroReturnFileDate(String strType)throws IOException{
              try{
                   SimpleDateFormat getFormatDate = new SimpleDateFormat("yyMM");
                   Date date = new Date();
                   String str = getFormatDate.format(date);
                   System.out.println("Current Date is : "+ str);
                   System.out.println("Fetching the Giro file now");
                   if(strType.equalsIgnoreCase("WPD") || strType.equalsIgnoreCase("ISTD")) {
                   FileReader inputFileReader = new FileReader("giro2itcs_"+strType+".txt");
                   ArrayList list = new ArrayList();
                   ArrayList list1 = new ArrayList();
                   System.out.println("Reading the file");
                   BufferedReader inputStream = new BufferedReader(inputFileReader);
                   String inLine = null;
                   String str1 = null;
                   while((inLine = inputStream.readLine()) != null && inLine.length() < 2)
                        list.add(inLine);
                   System.out.println("Control Record for giro2itcs_"+strType+"is:"+ inLine);
                   inputFileReader.close();
                   inputStream.close();
                   for (int i=0; i<inLine.length(); i++ )
                        str1 = inLine.substring(19,23);
                   System.out.println("date of the transaction is:"+str1);
                   if (str .equals(str1)){
                        System.out.println("giro2itcs_"+strType+".txt file is created today");
                        return "true";
                   else{
                        System.out.println("giro2itcs_"+strType+".txt file is not created today");
                        return "false";
                   }// end of if
                   return "test";
              }// end of try
              catch(Exception e) {
              System.out.println("The Exception is ::::::::::::::"+e);
    return "one";
    }//end of giroReturnFileDate(...) method
    }//end of of the class
    main method is seperate. this program compiles fine but am not getting the return value for this. none of the return values. plzzz help me.

    can you send me the code complete one ...
    i will debug and solve the problem
    [email protected]
    By publishing your email address you are likely to get loads of spam.

  • The return value of "which"

    Dear OS Xers,
    Subject: Script writing. The "which" command that that returns the location of a program.
    I'm writing a script that, at the beginning and before the main body of the script, checks that the commnds it uses are installed on the system. I was hoping to use "which" to do this, specifically checking the return value thus:
    which ls bash gaga >/dev/null # list of needed functions
    if [ $? != 0 ] # cause a rumpus.
    However I find that the return value is 0=OK even if which can't find some of the programs.
    Now, I can get around this for apple by writing a grep script that checks for "^no " in the std output. However I suspect that apple's implementation is non-standard, and that correctly "which" is meant to return an error value in this case. If this is the case then correctly the thing to do is not to script for apple (I'm only writing for my own, hopefully up-to-date systems!) but to correct the apple implementation.
    I want to check two things with you. First, I have no real basis for saying that apple's implementation is non-standard. I only know that I've checked other systems and man pages and all that I've come across so far indicate that an error is returned. Is there some more authoratitive method of checking what the behaviour should be? Some standards body? Secondly, I realise that this is small fry but I'd be more than happy to update apple's code if they are likely to approve the change. If that's the case can someone please show me where I can find the relevant source code?
    Regards, Max
    http://unixhelp.ed.ac.uk/CGI/man-cgi?which
    RETURN VALUE
    Which returns the number of failed arguments, or -1 when no `program-
    name' was given.
    Debian implementation:
    EXIT STATUS
    0 if all specified commands are found and executable
    1 if one or more specified commands is nonexistent or not executable
    2 if an invalid option is specified
    I'll have a chance to check the implementation on some solaris machines next week.
    As you can see, they're not consistent in terms of what error they return, but they do all return a non-zero value.
      Mac OS X (10.4.4)  

    The fink version ( /sw/bin/which ) does what you're looking as well--it doesn't recognize aliases though. tcsh and OS X's csh (which happens to be a duplicate of the tcsh executable) do recognize aliases.
    I guess the script (/usr/bin/which) is there to either echo one's path when a command's not found or give a different response to aliases. Otherwise one could change the script to:
    #! /bin/csh -f
    which $arg
    exit($?)
    Note the added -f...this prevents aliases from being set by csh when they don't exist in the bash shell. But neither script will recognize aliases set in a bash shell.
    TiBook G4   Mac OS X (10.3.9)  

  • Getter/setter methods -- how do I use the return values

    I'm just learning Java, and I haven't been to this site since the end of July, I think. I have a question regarding getter and setter methods. I switched to the book Head First Java after a poster here recommended it. I'm only about a hundred pages into the book, so the code I'm submitting here reflects that. It's the beginnings of a program I'd eventually like to complete that will take the entered information of my CD's and alphabetize them according to whatever criteria I (or any user for that matter) choose. I realize that this is just the very beginning, and I don't expect to have the complete program completed any time soon -- it's my long term goal, but I thought I could take what I'm learning in the book and put it to practical use as I go along (or at lest try to).
    Yes I could have this already done it Excel, but where's the fun and challenge in that? :) Here's the code:
    // This program allows the user to enter CD information - Artist name, album title, and year of release -- and then organizes it according the the user's choice according to the user's criteria -- either by artist name, then title, then year of release, or by any other order according to the user's choice.
    //First, the class CDList is created, along with the necessary variables.
    class CDList{
         private String artistName;//only one string for the artist name -- including spaces.
         private String albumTitle;//only one string the title name -- including spaces.
         private int yearOfRelease;
         private String recordLabel;
         public void setArtistName(String artist){
         artistName = artist;
         public void setAlbumTitle(String album){
         albumTitle = album;
         public void setYearOfRelease(int yor){
         yearOfRelease = yor;
         public void setLabel(String label){
         recordLabel = label;
         public String getArtistName(){
         return artistName;
         public String getAlbumTitle(){
         return albumTitle;
         public int getYearOfRelease(){
         return yearOfRelease;
        public String getLabel(){
        return recordLabel;
    void printout () {
           System.out.println ("Artist Name: " + getArtistName());
           System.out.println ("Album Title: " + getAlbumTitle());
           System.out.println ("Year of Release: " + getYearOfRelease());
           System.out.println ("Record Label: " + getLabel());
           System.out.println ();
    import static java.lang.System.out;
    import java.util.Scanner;
    class CDListTestDrive {
         public static void main( String[] args ) {
              Scanner s=new Scanner(System.in);
              CDList[] Record = new CDList[4];
              int x=0;     
              while (x<4) {
              Record[x]=new CDList();
              out.println ("Artist Name: ");
              String artist = s.nextLine();
              Record[x].setArtistName(artist);
              out.println ("Album Title: ");
              String album = s.nextLine();
              Record[x].setAlbumTitle(album);
              out.println ("Year of Release: ");
              int yor= s.nextInt();
                    s.nextLine();
              Record[x].setYearOfRelease(yor);
              out.println ("Record Label: ");
              String label = s.nextLine();
              Record[x].setLabel(label);
              System.out.println();
              x=x+1;//moves to next CDList object;
              x=0;
              while (x<4) {
              Record[x].getArtistName();
              Record[x].getAlbumTitle();
              Record[x].getYearOfRelease();
              Record[x].getLabel();
              Record[x].printout();
              x=x+1;
                   out.println("Enter a Record Number: ");
                   x=s.nextInt();
                   x=x-1;
                   Record[x].getArtistName();
                Record[x].getAlbumTitle();
                Record[x].getYearOfRelease();
                Record[x].getLabel();
                Record[x].printout();
         }//end main
    }//end class          First, I'd like to ask anyone out there to see if I could have written this any more efficiently, with the understanding that I'm only one hundred pages into the book, and I've only gotten as far as getter and setter methods, instance variables, objects and methods. The scanner feature I got from another book, but I abandoned it in favor of HFJ.
    Secondly --
    I'm confused about getter and setter methods -- I'd like someone to explain to me what they are used for exactly and the difference between the two. I have a general idea, that getters get a result from the method and setters set or maybe assign a value to variable. I submitted this code on another site, and one of the responders told me I wasn't using the returned values from the getter methods (he also told me about using a constructor method, but I haven't got that far in the book yet.). The program compiles and runs fine, but I can't seem to figure out how I'm not using the returned values from the getter methods. Please help and if you can explain in 'beginners terms,' with any code examples you think are appropriate. It will be greatly appreciated.
    By the way, I'm not a professional programmer -- I'm learning Java because of the intellectual exercise and the fun of it. So please keep that in mind as well.
    Edited by: Straitsfan on Sep 29, 2009 2:03 PM

    Straitsfan wrote:
    First, I'd like to ask anyone out there to see if I could have written this any more efficiently, with the understanding that I'm only one hundred pages into the book, and I've only gotten as far as getter and setter methods, instance variables, objects and methods. The scanner feature I got from another book, but I abandoned it in favor of HFJ.Yes, there is tons you could have done more efficiently. But this is something every new programmer goes through, and I will not spoil the fun. You see, in 3 to 6 months when you have learned much more Java, assuming you stick with it, you will look back at this and be like "what the hell was I thinking" and then realize just haw far you have come. So enjoy that moment and don't spoil it now by asking for what could have been better/ more efficient. If it works it works, just be happy it works.
    Straitsfan wrote:
    Secondly --
    I'm confused about getter and setter methods -- I'd like someone to explain to me what they are used for exactly and the difference between the two. I have a general idea, that getters get a result from the method and setters set or maybe assign a value to variable. I submitted this code on another site, and one of the responders told me I wasn't using the returned values from the getter methods (he also told me about using a constructor method, but I haven't got that far in the book yet.). The program compiles and runs fine, but I can't seem to figure out how I'm not using the returned values from the getter methods. Please help and if you can explain in 'beginners terms,' with any code examples you think are appropriate. It will be greatly appreciated.
    By the way, I'm not a professional programmer -- I'm learning Java because of the intellectual exercise and the fun of it. So please keep that in mind as well.First, if you posted this somewhere else you should link to that post, it is good you at least said you did, but doubleposting is considered very rude because what inevitably happens in many cases is the responses are weighed against each other. So you are basically setting anyone up who responds to the post for a trap that could make them look bad when you double post.
    You are setting you getters and setters up right as far as I can tell. Which tells me that I think you grasp that a getter lets another class get the variables data, and a setter lets another class set the data. One thing, be sure to use the full variable name so you should have setRecordLabel() and getRecodLabel() as opposed to setLabel() and getLabel(). Think about what happens if you go back and add a label field to the CDList class, bad things the way you have it currently. Sometimes shortcuts are not your friend.
    And yes, you are using the getters all wrong since you are not saving off what they return, frankly I am suprised it compiles. It works because you don't really need to use the getters where you have them since the CDList Record (should be lowercase R by the way) object already knows the data and uses it in the printout() method. Basically what you are doing in lines like:
    Record[x].getArtistName();is asking for the ArtistName in Record[x] and then getting the name and just dropping it on the floor. You need to store it in something if you want to keep it, like:
    String artistName = Record[x].getArtistName();See how that works?
    Hope this helped, keep up the good learning and good luck.
    JSG

  • How to store the return value from a select list in page item ?

    I'm sorry, I'm sure you will all flame me for this (and its long too :-(. I'm still trying to pick this up and havn't had time to read manual and this forum and up against the clock (as usual), but this must be something thats simple to do, otherwise why have 2 cols on LOV (display text and return value.
    normal kind of thing - master /detail, a master table and a detail table, master.id is PK in master, master.name is the name of the master item. detail.id is pk in detail, detail.mid is foreign key to master.id. I have a tabular report that displays a join of cols from master and detail, with 2 cols being links, one is a link on master.name, that passes master.id to page P1 and it displays a row from master. The other col displays detail.name and passes detail.id to page P3, P3 displays a row of the detail table.
    I want to populate a LOV with possible master.name values, but display the name of the current P3_MID value (from detail.mid). Then a user can pick a different master and it needs to update P3_MID so on submit it updates the row.
    I just can't seem to see in the manual how you can specify where the return value on a LOV goes?
    As I said, sorry for long post and not having had time to read docs correctly - someone just point me at the subject matter somewhere, please.

    Sorry, I was trying to be to complex and obviously APEX is just too damn cleaver - I figured out how this works - basically APEX pulls the LOV and then matchs the mid to it to display the correct name - simple and easy - just me making it difficult

  • How to set the returned value of CFL in a matrix

    dear all,
    I got a matrix binded to a DataSource and two CFLs are in this matrix. The codes for handling AfterChooseFromList is as following.  It works almost fine. But when a docoment containing more than two
    rows in the matrix and I reselect the CFL cell values more than two times, an error occured sometimes, not everytime. The error message is "This entry already exists in the following tables @CYW_PRROW [Message 131-183]"
    I have tried to find out what kind of situation to cause this error, but still in the mud.
    Can anybody give me some suggestion? Thanks.
    Public Sub OnAfterChooseFromList_Matrix(ByVal pVal As SAPbouiCOM.ItemEvent)
            Dim ActionSuccess As Boolean = pVal.ActionSuccess
            Dim oform As SAPbouiCOM.Form = SBO_Application.Forms.Item(pVal.FormUID)
            Dim oitem As SAPbouiCOM.Item = oform.Items.Item("mtx_0")
            Dim omatrix As SAPbouiCOM.Matrix = CType(oitem.Specific, SAPbouiCOM.Matrix)
            Dim oDataTable As SAPbouiCOM.DataTable
            oDataTable = pVal.SelectedObjects
            Dim val As String
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
            omatrix.GetLineData(pVal.Row)
            oform.DataSources.DBDataSources.Item("@CYW_PRROW").Offset = pVal.Row - 1
            If pVal.ColUID = "col_0" Then
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRItemCode", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            Else
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRSupp", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            End If
            omatrix.SetLineData(pVal.Row)
            If pVal.FormMode = "1" Then
                oform.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
            End If
        End Sub
    Another quesion, can I assign the returned value of CLF directly to the cell?

    Hello  Chao-Yi Wu,
    I don't have a real solution for you - just a few comments:
    1. At
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    I would add
            Try
                if oDataTable Is Nothing Then Exit Sub ' If the User cancels the CFL
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    2. At
       If pVal.ColUID = "col_0" Then
    I would make the branch by the pVal.ChooseFromListUID instead of the ColUID
    and the 2nd not with "Else" but with "Else If ....."
    3. It may work with EditText.String/Value of a cell but I never do that because of performance-reasons.
    I always do it the same way as you in principle - I don't really know what the problem is.
    4. Maybe some unique indexes on your table (although this should give an error at the update and not at CFL when "the unique-law is broken"...)?
    Sorry - that's all for the moment.
    Cheers,
    Roland

  • Formatting the return value of: File(myFile).lastModified()

    I'm checking file date and time stamps:
    myDate = File(myFile).lastModified()Is there a way to format the return value?
    myDate equals: 1205166439145I'd like to see something like:
    03/10/2008  12:27 PMI'm using the following code to print the value:
    System.out.println(myDate);

    Awesome! I really, really appreciate the help and the sample code!
    Successful Output:
    K:\COMMON\ITS\STEVEB\java\CompareFileDates>java CompareFileDates
    execution continuing...
    test1.steve (3/10/08 12:27 PM) is older than test2.steve (3/10/08 1:33 PM)Error free code:
    import java.io.File;
    import java.lang.Object;
    import java.util.Date;
    import java.text.Format;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    public class CompareFileDates {
      public static void main(String[] args) {
        String file1_stat = null;
        String file2_stat = null;
        String file1 = "test1.steve";
        String file2 = "test2.steve";
        long date1 = 0;
        long date2 = 0;
        String finalDate1 = null;
        String finalDate2 = null;
        boolean file1Exists = (new File(file1)).exists();
        if (file1Exists) {
            // File or directory exists
            file1_stat = "does exist";
            // Get the timestamp from file 1 and format it
            date1 = (new File(file1)).lastModified();
         Date newDate1 = new Date(date1);
         DateFormat df = new SimpleDateFormat();
         finalDate1 = df.format(newDate1);
         //System.out.println(file1 + " date: " + finalDate1);
        else {
            // File or directory does not exist
            file1_stat = "does not exist";
        boolean file2Exists = (new File(file2)).exists();
        if (file2Exists) {
            // File or directory exists
            file2_stat = "does exist";
            // Get the timestamp from file 2 and format it
            date2 = (new File(file2)).lastModified();
         Date newDate2 = new Date(date2);
         DateFormat df = new SimpleDateFormat();
         finalDate2 = df.format(newDate2);
         //System.out.println(file2 + " date: " + finalDate2);
        else {
            // File or directory does not exist
            file2_stat = "does not exist";
        if ((file1Exists == false) || (file2Exists == false)) {
                System.out.println("aborting program...");
        else { 
           System.out.println("execution continuing...");
           String relation;
           if (date1 == date2)
             relation = "the same age as";
           else if (date1 < date2)
             relation = "older than";
           else
             relation = "newer than";
           System.out.println(file1 + " (" + finalDate1 + ")" + " is " + relation + ' ' + file2 + " (" + finalDate2 + ")");
    }

  • LiveCycle DS , can't get the return value of fill( arg) from Assembler class

    Hi all!
    I'm a have small problem , can any one help me? Please
    I make a project which very similar to Product project(in
    example).
    1) Have Assembler class: I work correctly
    package flex.samples.stock;
    import java.util.List;
    import java.util.Collection;
    import java.util.Map;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    public class StockAssembler extends AbstractAssembler {
    public Collection fill(List fillArgs) {
    StockService service = new StockService();
    System.out.print(fillArgs.size());
    return service.getStocks();
    public Object getItem(Map identity) {
    StockService service = new StockService();
    return service.getStock(((Integer)
    identity.get("StockId")).intValue());
    public void createItem(Object item) {
    StockService service = new StockService();
    service.create((Stock) item);
    public void updateItem(Object newVersion, Object
    prevVersion, List changes) {
    StockService service = new StockService();
    boolean success = service.update((Stock) newVersion);
    if (!success) {
    int stockId = ((Stock) newVersion).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    changes);
    public void deleteItem(Object item) {
    StockService service = new StockService();
    boolean success = service.delete((Stock) item);
    if (!success) {
    int stockId = ((Stock) item).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    null);
    some require class is ok.
    2) I configure in data-management-config.xml
    <destination id="stockinventory">
    <adapter ref="java-dao" />
    <properties>
    <source>flex.samples.stock.StockAssembler</source>
    <scope>application</scope>
    <metadata>
    <identity property="StockId"/>
    </metadata>
    <network>
    <session-timeout>20</session-timeout>
    <paging enabled="false" pageSize="10" />
    <throttle-inbound policy="ERROR" max-frequency="500"/>
    <throttle-outbound policy="REPLACE"
    max-frequency="500"/>
    </network>
    </properties>
    </destination>
    3) My client app:
    I use :
    <mx:ArrayCollection id="stocks"/>
    <mx:DataService id="ds" destination="stockinventory"/>
    ds.fill(stocks); --> Problem here
    When I run this app, The StockAssembler on the server work
    correctly (i use printout to debug) . But variable stocks can't get
    the return value,it is a empty list.
    Please help me!

    Hi,                                                             
    The executeQueryAsync method is “asynchronous, which means that the code will continue to be executed without waiting for the server to
    respond”.
    From the error message “The collection has not been initialized”, which suggests that the object in use hadn’t been initialized after the execution of the executeQueryAsync method.
    I suggest you debug the code in browser to see which line of code will throw this error, then you can reorganize the logic of the code to avoid using the uninitialized object.
    A documentation from MSDN about Using the F12 Developer Tools to Debug JavaScript Errors
    for your reference:
    http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

Maybe you are looking for