Object reference not set to an instance of an object

Problem

You get the following error when running your application:

Server Error in ‘XXX’ Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request.  Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

This error frequently occurs when your database schema was changed after your application was created.  Iron Speed Designer doesn't know the schema has been changed and builds your application assuming an older version of the database schema.

Solution

Here's how to resynchronize your database schema with your application:

Step 1:  Select Databases, Synchronize Database Schema (Scan Only).  Iron Speed Designer will scan your database schema to detect any differences between your database schema and the schema currently used by Iron Speed Designer.

Step 2:  If changes were detected, select Databases->Accept All Changes.  This updates the schema that Iron Speed Designer uses for building your application code.

Step 3:  Build and run your application.

See Also

Part IX:  Troubleshooting Applications

Application Will Not Run

Application Runs But No Data is Displayed

Application Error Messages