Object/variable synchronization

i need to synchronize a primitive type (or object), am i doing it correctly?
private static boolean threadStarted = false;
public void init(){
    sunchronized (threadStarted){
        if (!threadStarted){
            schedulerThread = new Scheduler();
            schedulerThread.start();
            threadStarted = true;
}this is basically a servlet that does some database maintainance (I'm forced to make it a Servlet - so we can do different DB maintainance task from anywhere, by using the HTTP GET).
what i wanted to happen is that on init(), the servlet will create an instance of the Scheduler(which extends Thread to create and starts severals TimeTask objects using a Timer). i wanted to make sure only the scheduler thread is ever created get created once and started once. is the above code guareentee to start only one instance of the scheduler.
my previous code does not have synchronization, and i noticed that the scheduler is created twice 9therby - doing the same DB maintainance twice - which is extremely costly)
I thought of making the Scheduler a Singleton, and return null if the instance has been created...like the code below
public class Scheduler extends Thread{
    private static Scheduler scheduler = null;
    private Scheduler(){
        // .. initialize some local variables in here
    public synchronized static Scheduler getInstance(){
        if (scheduler == null)
            return new Scheduler();
        return null; 
    public void run(){
        // do some thread stuff here
public void init(){
    Scheduler temp = Scheduler.getInstance();
    if (temp != null){
        schedulerThread = temp;
        schedulerThread.start();
} any comment or better design? (yes, i have to use a servlet)

First, synchronized has a 'y' in it, not a 'u'. :^)yeah, i have a bad habit of typo. for me, most compile error (90%) aare typo
i really need to take a typing class or two.
Second, your methodology of checking null before creating the object involves
a race condition. Two requests, theoretically, could come in at the same time,
and you might get unexpected results. actually..the method is synchronized, so there wont (shouldn't) be any race condition. the first time the method is invoke..it will lock the method from all other..until the method is complete. I think this is pretty much a standard way of doing a Singleton (cept return null should be returning the scheduler object.)
I aslo knows about double locks and its flaw..that's why the method is synchronized instead of using lazy creation method.
You can only synchronize an object, so you would have to wrap boolean in an
instance of java.lang.Boolean. cool, this i didn't know about. guess i can make the primitive a Boolean instead of a boolean.
Be VERY wary of spinning off your own threads in a J2EE container (e.g.,
Servlet). The J2EE specification specifically requests you avoid doing this. The
primary reason is that the container should be responsible for multi-threading
and thread management. That having been said, you CAN spin off your own
threads, just be very careful.yes, i heard about this so many time..but there's really no choice but to use thread in my application. that's why i come here to ask..hoping someone works with this type of problem before..and know a better design.

Similar Messages

  • Trying to pass and object variable to a method

    I have yet another question. I'm trying to display my output in succession using a next button. The button works and I get what I want using test results, however what I really want to do is pass it a variable instead of using a set number.
    I want to be able to pass the object variables myProduct, myOfficeSupplies, and maxNumber to method actionPerformed so they can be in-turn passed to the displayResults method which is called in the actionPerformed method. Since there is no direct call to actionPerformed because it is called within one of the built in methods, I can't tell it to receive and pass those variables. Is there a way to do it without having to pass them through the built-in methods?
    import javax.swing.JToolBar;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JTextArea;
    import javax.swing.JScrollPane;
    import javax.swing.JPanel;
    import java.net.URL;
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class Panel extends JPanel implements ActionListener
         protected JTextArea myTextArea;
         protected String newline = "\n";
         static final private String FIRST = "first";
         static final private String PREVIOUS = "previous";
         static final private String NEXT = "next";
         public Panel( Product myProduct, OfficeSupplies myOfficeSupplies, int maxNumber )
                 super(new BorderLayout());
              int counter = 0;
                 //Create the toolbar.
                 JToolBar myToolBar = new JToolBar( "Still draggable" );
                 addButtons( myToolBar );
                 //Create the text area used for output.
                 myTextArea = new JTextArea( 450, 190 );
                 myTextArea.setEditable( false );
                 JScrollPane scrollPane = new JScrollPane( myTextArea );
                 //Lay out the main panel.
                 setPreferredSize(new Dimension( 450, 190 ));
                 add( myToolBar, BorderLayout.PAGE_START );
                 add( scrollPane, BorderLayout.CENTER );
              myTextArea.setText( packageData( myProduct, myOfficeSupplies, counter ) );
              setCounter( counter );
         } // End Constructor
         protected void addButtons( JToolBar myToolBar )
                 JButton myButton = null;
                 //first button
                 myButton = makeNavigationButton( FIRST, "Display first record", "First" );
                 myToolBar.add(myButton);
                 //second button
                 myButton = makeNavigationButton( PREVIOUS, "Display previous record", "Previous" );
                 myToolBar.add(myButton);
                 //third button
                 myButton = makeNavigationButton( NEXT, "Display next record", "Next" );
                 myToolBar.add(myButton);
         } //End method addButtons
         protected JButton makeNavigationButton( String actionCommand, String toolTipText, String altText )
                 //Create and initialize the button.
                 JButton myButton = new JButton();
                     myButton.setActionCommand( actionCommand );
                 myButton.setToolTipText( toolTipText );
                 myButton.addActionListener( this );
                   myButton.setText( altText );
                 return myButton;
         } // End makeNavigationButton method
             public void actionPerformed( ActionEvent e )
                 String cmd = e.getActionCommand();
                 // Handle each button.
              if (FIRST.equals(cmd))
              { // first button clicked
                          int counter = 0;
                   setCounter( counter );
                 else if (PREVIOUS.equals(cmd))
              { // second button clicked
                   counter = getCounter();
                      if ( counter == 0 )
                        counter = 5;  // 5 would be replaced with variable maxNumber
                        setCounter( counter );
                   else
                        counter = getCounter() - 1;
                        setCounter( counter );
              else if (NEXT.equals(cmd))
              { // third button clicked
                   counter = getCounter();
                   if ( counter == 5 )  // 5 would be replaced with variable maxNumber
                        counter = 0;
                        setCounter( counter );
                      else
                        counter = getCounter() + 1;
                        setCounter( counter );
                 displayResult( counter );
         } // End method actionPerformed
         private int counter;
         public void setCounter( int number ) // Declare setCounter method
              counter = number; // stores the counter
         } // End setCounter method
         public int getCounter()  // Declares getCounter method
              return counter;
         } // End method getCounter
         protected void displayResult( int counter )
              //Test statement
    //                 myTextArea.setText( String.format( "%d", counter ) );
              // How can I carry the myProduct and myOfficeSupplies variables into this method?
              myTextArea.setText( packageData( product, officeSupplies, counter ) );
                 myTextArea.setCaretPosition(myTextArea.getDocument().getLength());
             } // End method displayResult
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event dispatch thread.
         public void createAndShowGUI( Product myProduct, OfficeSupplies myOfficeSupplies, int maxNumber )
                 //Create and set up the window.
                 JFrame frame = new JFrame("Products");
                 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                 //Add content to the window.
                 frame.add(new Panel( myProduct, myOfficeSupplies, maxNumber ));
                 //Display the window.
                 frame.pack();
                 frame.setVisible( true );
             } // End method createAndShowGUI
         public void displayData( Product myProduct, OfficeSupplies myOfficeSupplies, int maxNumber )
              JTextArea myTextArea = new JTextArea(); // textarea to display output
              JFrame JFrame = new JFrame( "Products" );
              // For loop to display data array in a single Window
              for ( int counter = 0; counter < maxNumber; counter++ )  // Loop for displaying each product
                   myTextArea.append( packageData( myProduct, myOfficeSupplies, counter ) + "\n\n" );
                   JFrame.add( myTextArea ); // add textarea to JFrame
              } // End For Loop
              JScrollPane scrollPane = new JScrollPane( myTextArea ); //Creates the JScrollPane
              JFrame.setPreferredSize(new Dimension(350, 170)); // Sets the pane size
              JFrame.add(scrollPane, BorderLayout.CENTER); // adds scrollpane to JFrame
              JFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); // Sets program to exit on close
              JFrame.setSize( 350, 170 ); // set frame size
              JFrame.setVisible( true ); // display frame
         } // End method displayData
         public String packageData( Product myProduct, OfficeSupplies myOfficeSupplies, int counter ) // Method for formatting output
              return String.format( "%s: %d\n%s: %s\n%s: %s\n%s: %s\n%s: $%.2f\n%s: $%.2f\n%s: $%.2f\n%s: $%.2f",
              "Product Number", myOfficeSupplies.getProductNumber( counter ),
              "Product Name", myOfficeSupplies.getProductName( counter ),
              "Product Brand",myProduct.getProductBrand( counter ),
              "Number of Units in stock", myOfficeSupplies.getNumberUnits( counter ),
              "Price per Unit", myOfficeSupplies.getUnitPrice( counter ),
              "Total Value of Item in Stock is", myOfficeSupplies.getProductValue( counter ),
              "Restock charge for this product is", myProduct.restockingFee( myOfficeSupplies.getProductValue( counter ) ),
              "Total Value of Inventory plus restocking fee", myOfficeSupplies.getProductValue( counter )+
                   myProduct.restockingFee( myOfficeSupplies.getProductValue( counter ) ) );
         } // end method packageData
    } //End Class Panel

    multarnc wrote:
    My instructor has not been very forthcoming with assistance to her students leaving us to figure it out on our own.Aren't they all the same! Makes one wonder why they are called instructors. <sarcasm/>
    Of course it's highly likely that enough information was imparted for any sincere, reasonably intelligent student to actually figure it out, and learn the subject in the process.
    And if everything were spoonfed, how would one grade the performance of the students? Have them recite from memory
    public class HelloWorld left-brace
    indent public static void main left-parenthesis String left-bracket right-bracket args right-parenthesis left-brace
    And everywhere that Mary went
    The lamb was sure to go
    db

  • Error in the Input scchduled.Object variable or with block varaible not set

    Hai Experts ,
    In the input schdueld , data is not accepting ..
    Its shows error : Object variable or with block varaible not set
    Please help..
    Regards
    Daya.........

    Hi SAP collegues,
    At my site, BPC Excel created this problem too "Object Variable or With Block Variable not set" .
    It turned out that this is symptom of a a dys-functioning BPC COM Plug-in in XL2007 or XL2010!
    This is a consequence that your Excel recently crashed while using BPC. And it relates to an Excel Add-in becoming disabled when the applications crashes.  Please check the following.
    Note before doing the following, close all other open Excel and BPC sessions.
    Within Excel go to File à Options
    Select the Add-Ins option on the left
    Select the <<COM Add-ins >> option in the Manage drop down, and click Go
    Make sure that the Planning and Consolidation option is selected.  If not, mark this box and click OK.
    If you do not see anything listed, return to the Add-in screen and select the Disabled Items option, and see if Planning and Consolidation is listed there.
    Let me know if you have any queries,
    Kind Regards,
    robert ten bosch

  • Object variable not set (Error 91) in Input Enabled query

    Hello,
    I'm having the following issue.  I have created an input enabled query and included it in a planning workbook.  Every time I open the workbook or query, and I got to an input enabled cell, I get the error below:
    Object variable not set (Error 91)
    This client has not used planning workbooks before.  The system is on 7.10 SP10 for Bex Analyzer and SAP Gui 7.10 Patch Level 13. 
    I'm not finding any relevant so far in SDN.  Any help anyone can provide is greatly appreciated.
    Thanks,
    Senthil

    Hello,
    Just wanted to let you all know that this issue has been resolved after updating my SAP Gui to 7.2 Patch Level 4 (Patch Level 5 was causing some other issues so I decided to stay at Level 4).
    Thanks,
    Senthil

  • SSIS : Read Rows from an Object variable in SSIS Script Task which is looped many times.

    Hello All,
    Here is what I am trying to do...
    1. I am having two rows, one column in an Object Variable. (vLoopCountObj).
    2. I am having 30 Rows, 2 Columns in my second Object  Variable (vTableRowsObj)
    3. I have a FOR EACH LOOP which will run for number of rows in vLoopCountObj i.e 2 times here.
    4. I have a Script Task inside the FOR EACH LOOP to display all the rows of vTableRowsObj.
    5. When I execute, 30 Rows gets displayed only once. It will not display when the loop goes for second iteration. Please help me to display for second time.
    6. I have used below code to display the rows whithin the script task which is in SSIS dataflow task.
    Imports System
    Imports System.Data
    Imports System.Math
    Imports Microsoft.SqlServer.Dts.Runtime
    Imports System.Xml
    Imports System.Collections
    Imports System.Data.OleDb
    Public Class ScriptMain
    Public Sub Main()
    Dim oleDA As New OleDbDataAdapter
    Dim dt As New DataTable
    Dim col As DataColumn
    Dim row As DataRow
    Dim sMsg As String
    oleDA.Fill(dt, Dts.Variables("vTableRowsObj").Value)
    MsgBox("Number of Rows " + dt.Rows.Count.ToString())
    For Each row In dt.Rows
    For Each col In dt.Columns
    sMsg = sMsg & col.ColumnName & ": " & row(col.Ordinal).ToString & vbCrLf
    Next
    MsgBox(sMsg)
    sMsg = ""
    Next
    Dts.TaskResult = Dts.Results.Success
    End Sub
    End Class

    Hi Raj,
    It is verrrry interesting issue. I can also confirm that it doesnt loop again. I've made a simple test and figured that in the second loop even you fill the Dataadapter, record count is zero. Which brings me up to the idea: Somehow, after you read the object
    variable resultset, you can not read it again in the for each loop.
    Strange, probably a bug or a technical issue that is beyond my existing knowledge.
    I can provide a workaround. You can also loop in script task for first variable. (Nested loops)
    Let other members to examine and comment on this.
    Regards
    Onur
    (For others who also wants to test, here is my scenario
    Execute SQL Task 1:
    Query: SELECT 1 as Cnt UNION ALL SELECT 2 as Cnt
    Resultset: Full Resultset
    ResultSet Tab: Name: 0, Variable Name: User::vLoopCountObj;
    Execute SQL Task 2:
    Query: SELECT 1 as ColA, 2 as ColB UNION ALL SELECT 3 as ColA, 4 as ColB UNION ALL SELECT 5 as ColA, 6 as ColB
    Resultset: Full Resultset
    ResultSet Tab: Name: 0, Variable Name: User::vTableRowsObj;
    For Each Loop Container:
    Collection: Enum: ForEach ADO Enum
    Source Object: User::vLoopCountObj
    Enum Mode: Rows n the first Table
    Script Task:
    ReadOnlyVariables: User::vTableRowsObj
    Script Source:
    Imports System
    Imports System.Data
    Imports System.Math
    Imports Microsoft.SqlServer.Dts.Runtime
    Imports System.Xml
    Imports System.Collections
    Imports System.Data.OleDb
    Public Class ScriptMain
    Public Sub Main()
    Dim oleDA As New OleDbDataAdapter
    Dim dt As New DataTable
    Dim col As DataColumn
    Dim row As DataRow
    Dim sMsg As String
    oleDA.Fill(dt, Dts.Variables("vTableRowsObj").Value)
    Dts.Events.FireInformation(-1, "START!!!!!!!!!!!!!!", "START LOOP", "", 0, True)
    Dts.Events.FireInformation(1, "RowCount: ", dt.Rows.Count.ToString(), "", 0, True)
    For Each row In dt.Rows
    For Each col In dt.Columns
    sMsg = sMsg & col.ColumnName & ": " & row(col.Ordinal).ToString & vbCrLf
    Next
    Dts.Events.FireInformation(1, "Msg: ", sMsg, "", 0, True)
    sMsg = ""
    Next
    Dts.TaskResult = ScriptResults.Success
    End Sub
    End Class
    BI and ERP Senior Consultant @ Nexum Bogazici
    If it is, Please dont forget to mark as answered or at least vote as helpful if the post helps you in any ways.

  • Error while deleting loc - Object variable or With block variable not set

    I could not delete some of the existing locations in the HyperionFDM and it results in the error Object variable or With block variable not set.
    I verified that the Server has the apps and subfolder which is needed for this application \\servername\data\app1\Inbox etc.
    Any pointers will be really useful. Thanks !
    - Ap

    Hi,
    There can be several reasons for it, for now I would suggest you:
    This error generally comes because:
    Cause
    The user that logs on workbench does not have write access to the Financial Data Quality Management application shared folder.
    Solution
    Log onto the machine where the Financial Data Quality Management application files are located. You can locate this path by performing the following:
    a) At the FDM Login page choose <Add Application> and login
    b) Highlight the FDM Application in question and click the "Modify" button
    c) The application path field displays the location of the application folder
    2. Go the shared folder, right click and go to Properties -> Sharing -> Permissions and add the user to the Share Permissions and grant "Change" at a minimum.
    Please check and let me know
    I would suggest you to post FDM related posts in Financial Data Management
    J

  • Error: Object variable or With block variable not set.

    Hi,
    when i try to fill the control tables and browse for the target period in HFM (sys 9.3.1) i get the error: Error: Object variable or With block variable not set.
    When browsing for the target value in the location for the value no problem occurs.
    Anybody a clue?

    Hi SAP collegues,
    At my site, BPC Excel created this problem too "Object Variable or With Block Variable not set" .
    It turned out that this is symptom of a a dys-functioning BPC COM Plug-in in XL2007 or XL2010!
    This is a consequence that your Excel recently crashed while using BPC. And it relates to an Excel Add-in becoming disabled when the applications crashes.  Please check the following.
    Note before doing the following, close all other open Excel and BPC sessions.
    Within Excel go to File à Options
    Select the Add-Ins option on the left
    Select the <<COM Add-ins >> option in the Manage drop down, and click Go
    Make sure that the Planning and Consolidation option is selected.  If not, mark this box and click OK.
    If you do not see anything listed, return to the Add-in screen and select the Disabled Items option, and see if Planning and Consolidation is listed there.
    Let me know if you have any queries,
    Kind Regards,
    robert ten bosch

  • Error: Object variable or with variable not set while accessing BPC Excel

    Hi,
    I am working on BPC NW 7.5. When I am trying to access BPC for Excel I am getting the below error.
    'object variable or with variable not set'
    When I click on BPC for Excel it ask for the credentials, after entering it we encounter this error.
    Any idea why is this happening?
    Regards,
    Priyanka Singh

    Hi Renne,
    Could you share me the solution to resolve the issue?
    I am getting an error "object variable or with block variable not set" while trying to submit data through an Input schedule.
    I am working on SAP BPC 7.0 NW and using MS Excel 2003.
    I can log in to BPC Admin and excel with my user id and password.
    Only when i am trying to click esubmit --> send and refresh schedules i am getting this error.
    I checked my security profile and i have the submit data task in my task profile.
    Following couple existing SDN postings i tried to check the ADD-INs of the excel on my system. However it looks like the steps listed in the existing SDN posts are for MS EXCEL 2007.
    Please suggest me how do i resolve this issue. Please note I am working on SAP BPC 7.0 NW and using MS Excel 2003.
    Regards,
    Jagat

  • Error: object variable or with block variable not set when creating journal

    Hello
    When I try to create a new journal, I get an error "object variable or with block variable not set"
    This is happening with some computers but not all of them, the same user can create a journal in some computers.
    I tried uninstalling and reinstalling BPC office client but that did not work.
    Do you have any other ideas ?
    Thank you in advance.

    Hi,
       You have to check first  if you are able to access the reporting service frm that speific client machine typing:
    http://<reporting server name>/reports. If all is woking well , you have to check also the number of default sheets for an empty excel sheet (should be 3) - I ma not sure what version are you using.
        If still not work, please let me know when exactly the error appear, when you try to open the template (clicking on journal option) or after when you fill the report, save it, so on.
    Best regards,
    Mihaela

  • Error: Object variable or with variable not set while accessing

    Hi Friends,
    I am facing 'object variable or with variable not set' Error while opening BPC Excel.
    I have done, In Excel 2007, go to Excel Option -> Add-Ins -> Manage: COM Add-ins and Go...
    You look "BPC COM" disable and need enable again.
    But I am getting same Error message again and again. Please help me...
    I did BPC uninstall & install but still error massage poping
    Thank you in Advance

    Hi Kumar,
    I doubt if you are following the below steps. Please confirm. Thanks
    1. Open your normal Excel.
    2. Check for Planning and Consolidation tab on the top ribbon.
    3. I assume this wouldn't be available for you.
    4. If this is not present, open the Excel Options
    5. Click on Add-Ins and check the Active Application Add-ins
    6. Is Planning and consolidation present in it?
    7. If not, select "Disabled Add-ins" in the drop down below besides "Manage".
    8. Click "GO"
    9. Select the Planning and Consolidation add-in from disabled add-ins and "Enable" it.
    10. Check once again if this add-in is prersent in "Active" add-ins .
    11. Now close and re-open excel
    12. The Tab should be present now (Planning and Consolidation)
    Regards,
    Sanjeev

  • Object variable or With Block variable not set

    Hi - We have saved a working input schedule to a new name and modified it to use for another company.  There is a report tab to bring down the historical units from BPC, a tab to trend the history, and a tab that references the other two tabs to forecast the units into the future and send the forecasted units back up to BPC.  The input schedule that was saved to a new name and modified works fine until we attempt to Send and Refresh the active worksheet on the forecast tab.   When we do so, it indicates the number of records that will be sent, but when it attempts to Process the upload to BPC we receive an error message that indicates  Object variable or With Block variable not set  and no records are sent to BPC.
    We have retested the original input template that was copied and the original template still transfers data successfully to BPC.  We have also tried starting with a blank input template and copying in the formulas from the working template and we still get the same error message.  
    We have read several postings on this error and it seems to be a pretty general error, and so far none of the suggestions have worked for us.  One suggested checking for special characters, but the only non alpha non-numeric characters used are dashes in the values of one of the dimensions and spaces and underlines in the formulas used to forecast the units, but both of these are present and don't seem to cause any problem in the working input schedule. 
    We are currently on BPC 7.5 SP6 and using Excel 2010.
    Any help would be appreciated.

    >Note 1494285 seems to be in reference to BPC for Microsoft and we are using NetWeaver.
    Sorry, 1513080 is for NW (there's link to it in bottom of 1494285) :
    - Currently only BPC 7.5 NW SP05 and above support Office 2010
    - Note: BPC NW 7.5 NW cannot work on office 2010 (64-bits), office 2010 (64-bits) is not supported.
    Check your proxy settings (note 1592560: Getting "Error 91 Object variable or with block variable after upgrade to SP06" in the Excel Client.)
    Try 1576893: After upgrading to SP06, the EVDRE reports stop working.
    PS. Maybe I wrong, but some problems with 2010 Office clients in our system dissapear after patching to SP08.

  • "Object Variable or With Block Variable not set" Error on Adobe Presenter 8 Ribbon on PPT 2010/2007

    Returning back from Adobe training at KEDRIYA VIDYALAYA no 1  Jalhalli Bangalore when I started Powerpoint to use Adobe Presenter 8  I am getting : "Object Variable or With Block Variable not set " error on clicking any of the menu features of the Presenter Ribbon. My Config are :
    i)             WINDOWS XP SP 3
    ii)            POWERPOINT 2007 / 2010 ( for both same error is coming)
    iii)           MS XML Library 4.0 installed.
    iv)           Adobe Presenter 8
    I am using all liscenced copies of softwares.
    Hardware specs are also as per Minimum Adobe standards.
    I Have tried a lot removing Data Execution Prevention Mode , but all in vain the problem still exists
    Why is this happening. Please help.
    Kamal K Gupta
    PGT Comp. SC.
    KV No. 2 Srivijaya nagar

    This is not really a "Downloading, Installing, Setting Up" question; you may get better help if you ask in the Presenter forum.

  • Object variable or with block variable not set- while trying to submit data

    Hi Gurus,
    Could you share me the solution to resolve the issue?
    I am getting an error "object variable or with block variable not set" while trying to submit data through an Input schedule.
    I am working on SAP BPC 7.5 NW and using MS Excel 2007.
    I can log in to BPC Admin and excel with my user id and password.
    I checked my security profile and i have the submit data task in my task profile. My all other Input Schedules are working very well. Only one of the IS is causing this problem. The same input Schedule when saved as Dynamic Template it works well and data is sent successfully.
    Regards,
    KumarMG

    Hi Kumar,
    This might be incase you have some special character like & in the input schedule template. you need to remove the special character in that case.
    Hope this resolves your issue.
    Rgds,
    Poonam

  • Object variable or With block variable not set (Error 91)

    I am not a developer, however i have to help to run a VB program.
    when using a local administrator to run this program there will be error :
    Object variable or With block variable not set (Error 91)
    however using a DOMAIN Administrator to run without problem.
    any idea

    Do you have the source code? The error itself is a nullreference error. It means the code is trying to use some object to access a property of method of that object, but the object is currently null so it fails. The fact that it runs different when you run
    as a domain admin versus local admin could mean that it does something via a network location or resource, and when running as a domain admin, it has access to that resource and succeeds, but the local admin doesn't have access to the needed resource, and
    the code doesn't check to see if the object is null before using it. If you don't have the source code, then it will be difficult to fix, other than giving the local admin the ability to access whatever it is the program is looking to access.
    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com

  • How do I make a data connection object variable?

    This should be easy but I can' t sort it out.
    I created a database connection and cloned it so I could avoid security issues.
    The cloned connection works fine and I can query for specific records and the bound fields are populated. The problem comes when I try to advance to the next record with "clonedDB.next()" for example. The error that says "clonedDB is not defined". This code is all in Java by the way.
    So I though maybe I need to create an object variable to contain the clonedDB object; this is what I can't figure out how to do or if will solve my problem.
    Thanks in advance!
    Cheers,
    Al

    Can you send me your form so I can have a look?
    If the attachment ability is not available for you can you email it to [email protected]
    Thanks
    Paul

Maybe you are looking for

  • Solaris 9 x86 platform update 4 8/03 can not start Management Console

    smc& but cannot start management console 2.1 no problem on solaris 8 x86 platform. Error as below : I cannot start the Solaris Management Console in Solaris 9. The splash screen appears for a few seconds, then nothing else, core dumped. There is a er

  • RE: iMovie wont play 2 separate tunes?

    I have tried importing a second audio clip into iMovie as I obviously don't want the same tune throughout the clip, but it doesn't play the second tune? Is the reason the same as a previous post/answer about the tune coming from iTunes Store & it bei

  • Is it possible to open photo in the default device photo viewer application ?

    Is it possible to open photo with the default device photo viewer ?

  • Shopping Cart Disappearing

    Hi all, Having an issue with cart retention which is causing headaches for our clients. Normally if a customer quits the browser while shopping and comes back to browsing again during the lifetime of the cart, all the items are held in the cart. We a

  • Waveform Editor Grid Lines in Audition 5.5

    Hi, Anyone know how to turn OFF the grid lines (vertical and horizontal) in the Waveform Editor view in Audition 5.5? I'm on a try-out version at the moment, but have used Audition 2 for years - I loved the way the display was completely customisable