SQL Server Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘null value’

FIX: Analysis Manager Cube Browser May Fail While You Browse Cube Data

Symptoms
Analysis Server may stop and then restart when you browse cube data if the underlying data source is SQL Server and the data access is performed by using the OLE DB provider for SQL Server. Therefore, cube browsing from the cube browser may fail.
Resolution
When the query that is generated by Analysis Manager is too large, the SQL Server provider returns success for the status of the query and NULL for the pointer. The NULL value for the pointer causes Analysis Services to stop and then restart.

InvalidCastException when you bind DateTimePicker that contains a null value in Visual Basic

Symptoms
When you bind a DateTimePicker control to a data source, you may receive the following error message:

An unhandled exception of type ‘System.InvalidCastException’ occurred in mscorlib.dll
Additional information: Object cannot be cast from DBNull to other types.
Resolution
This behavior occurs if the field that is bound to the DateTimePicker control contains a null value that is represented by the System.DBNull object. The DateTimePicker control does not support the System.DBNull object.