That would indicate that dt is not set to an instance of an object (Nothing) at the point it is used in FindRow as an Object.
From what I saw in the code, you are setting a local dt variable from ItemInOrder.DataSource. You have dt defined as a global variable. Try commenting out line 45 and see if that is the problem AND/OR put in code to handle if dt passed to FindRow method IsNothing() before trying to use it.
Main Topics
Browse All Topics





by: gazzzzzzerPosted on 2009-07-02 at 15:32:56ID: 24768393
To start with, try adding a brreakpoint in the FindRow function and check if the dt value being passed is null, maybe line 45 is not actually initialising the variable.
If this is not null, while still debugging, inspect the dt object and check the Rows property is returning a valid value.
Post your finding and I will try and help more