Red Gate forums :: View topic - Object reference not set to an instance of an object
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Doc 2
SQL Doc 2 forum

Object reference not set to an instance of an object

Search in SQL Doc 2 forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
alicorn2



Joined: 16 Apr 2010
Posts: 3

PostPosted: Wed Nov 07, 2012 11:19 pm    Post subject: Object reference not set to an instance of an object Reply with quote

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:

Code:
/****** 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 „.„.š()
at „.„.š™()
at „.„.“™()
at „.„.Œ()
at †.†.(€ )
at ž„.‘†.š(€ )
at ž„.„.š(€ )
at †.†.(€ )
at “†.‡.(Project , String , DatabaseObjectNode , ‡ )
at “†.‡.(String , Project , ProjectItem , DatabaseObject )
Back to top
View user's profile Send private message
alicorn2



Joined: 16 Apr 2010
Posts: 3

PostPosted: Wed Nov 07, 2012 11:32 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 209

PostPosted: Fri Nov 09, 2012 12:32 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
meklembl



Joined: 24 Aug 2007
Posts: 89
Location: Solon, OH, USA

PostPosted: Wed Jan 09, 2013 8:48 pm    Post subject: Reply with quote

Is this ever going to be fixed?
_________________
Larry M
Cleveland, OH USA
Back to top
View user's profile Send private message
reinhe



Joined: 25 Sep 2013
Posts: 1

PostPosted: Wed Sep 25, 2013 7:38 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
JonathanWatts



Joined: 15 Dec 2004
Posts: 400
Location: Red Gate Software

PostPosted: Wed Nov 06, 2013 1:01 pm    Post subject: Reply with quote

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-development/sql-doc/entrypage/sql-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
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group