---
title: "DataShed5 - Error when opening table in View Data"
canonical: "https://servicedesk.maxgeo.com/space/MAXGEO/1082916865/DataShed5%20-%20Error%20when%20opening%20table%20in%20View%20Data"
format: markdown
---
**Issue: **When viewing a table in DataShed5 an error is thrown

“Error Occurred retrieving data. Object reference not set to an instance of an object”

![image](media://673ab2af-c544-4502-93d4-75baab8d1a1e)

**Cause**: In DataShed 5 there is a requirement for the OrderBy field to be not NULL in tblSYSDSConfig for the TABLE types


**Resolution:** Run the below script to update the NULL to BLANK in tblSYSDSConfig 

```sql
update tblSYSDSConfig set OrderBy = '' where OrderBy is NULL and Type = 'TABLE'
```

> ⚠️ **DB Modification**
> ⚠️ 
> ⚠️ **Before any change is made to a user database (or system), maxgeo recommends competent staff should follow all standard database change management practices and never make untested changes to a production database.**  
> ⚠️ **Change, test and document all modifications on a test copy of your database to ensure results are as expected before implementing them on your live database. Always ensure a full backup is available in case rollback is required and follow all company change management procedures and practices.**