Options

Object reference not set to an instance of an object

alicorn2alicorn2 Posts: 5
edited November 6, 2013 7:01AM in SQL Doc Previous Versions
Hi there,

I just downloaded a 14 day trial of SQL Doc 2, and I am getting "Object reference not set to an instance of an object" on one of my tables.

As far as I can tell there isn't anything wrong with the table itself. It doesn't have any sort of special permissions that are different from the rest of the database.

It is running on SQL 2005, and here's the create script for the table:
/****** Object:  Table [dbo].[Forecast]    Script Date: 11/07/2012 14:13:30 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Forecast](
	[forecast_id] [int] IDENTITY(1,1) NOT NULL,
	[firecentre_name] [varchar](15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[forecast_timestamp] [smalldatetime] NOT NULL CONSTRAINT [DF_Forecast_ForecastTimeStamp]  DEFAULT (getdate()),
	[forecast] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[valid_as_of] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_Forecast_ValidAsOf]  DEFAULT (getdate()),
	[forecaster_info] [varchar](150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[picture_URL] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[preformatted] [bit] NOT NULL CONSTRAINT [DF_Forecast_Preformatted]  DEFAULT (0),
	[deleted] [bit] NOT NULL CONSTRAINT [DF_Forecast_Deleted]  DEFAULT (0),
 CONSTRAINT [PK_Forecast] PRIMARY KEY CLUSTERED 
(
	[forecast_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO

/****** Object:  Index [IX_Forecast_firecentre_timestamp]    Script Date: 11/07/2012 14:13:30 ******/
CREATE NONCLUSTERED INDEX [IX_Forecast_firecentre_timestamp] ON [dbo].[Forecast] 
(
	[firecentre_name] ASC,
	[forecast_timestamp] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 90) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'Description', @value=NULL , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Forecast'
GO
EXEC sys.sp_addextendedproperty @name=N'Importance', @value=NULL , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Forecast'

The log file returns the following when I try to preview it through the interface:

14:13:58.763|Info |Logging |1 |Current Logging levels enabled: Fatal,Error
14:14:01.436|Error |Engine Internal |19 |PreviewObjectThread:HTML Preview failed
System.NullReferenceException: Object reference not set to an instance of an object.
at RedGate.SQLCompare.Engine.ExtendedPropertyValue.ToString()
at „.„.

Comments

  • Options
    It turns out it's not just that one table, but all affected tables are within that same database.

    I know this list of tables isn't useful to you, but I'm putting it here so I can find them again later if you want to know more information about these other tables:

    Forecast
    Lookup_DangerRegion
    Lookup_Old_BC_Station_Code
    Lookup_OperatingFrequency
    Lookup_RegionDistrict
    Lookup_WeatherZone
    Lookup_WeatherZone_DangerRegion
    Lookup_WebPage
    NZ_CSV
    NZ_CSV_AD_HOC
    SFMSColour
    SFMSLegend
    Station
    UserWebPage

    I can run the application against the rest of the databases on the entire server with no problem. This is SQL Doc 2.1.2.1.
  • Options
    Sorry you are experiencing this.
    This is a known issue under the internal reference number of SDOC-1495
    If you create an extended property and set the value to null, SQL Doc fails to generate documentation and throws an "object reference not set to an instance of an object"

    Current workaround is to not set the value of an extended property to NULL.
    Manfred Castro
    Product Support
    Red Gate Software
  • Options
    meklemblmeklembl Posts: 107 Bronze 2
    Is this ever going to be fixed?
    Larry M
    Cleveland, OH USA
  • Options
    reinhereinhe Posts: 1 New member
    We encounter the same porblem, and are wondering when this will be fixed?

    Should be such a big change i suppose?

    Or a chekbox to select/deselect extended properties info
    Or fix this big please
  • Options
    Hi there,

    I believe this issue has been resolved in SQL Doc v3. You can get the beta of SQL Doc v3 from here: http://www.red-gate.com/products/sql-de ... doc-3-beta

    If you are still encountering a problem please let me know.

    Hope this helps,

    Jonathan
    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
Sign In or Register to comment.