Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

DBNull to type Date not valid error
Last Post 09/17/2009 6:54 PM by shelly campbell. 12 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
shelly campbell
New Member
New Member
Posts:26


--
08/28/2009 4:15 PM

When searching on the document library with the term "service excellence", the search returns a list of results but when the subsequent pages of the results are selected, it returns the following error message:

A critical error had occurred - Conversion of type "DBNull" to type "Date" is not valid

Would anyone have any idea as to what could be causing this error? This is occurring on our production server but not on our development server.

Thanks!

shelly campbell
New Member
New Member
Posts:26


--
09/02/2009 5:28 PM

Anyone have any ideas?

Thanks

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/04/2009 1:19 PM
Hi Shelly,

What version of DMX is this? There was an issue where some records had LastModified dates being null (in DMX_Entries). Can you check this? I believe this was repaired in a recent version of DMX.

Peter
shelly campbell
New Member
New Member
Posts:26


--
09/04/2009 9:59 PM

We are using the latest version of DMX - v 5.1.3. Another search for "IDD" turns up the same error message on page 2 of the search results.

Shelly

shelly campbell
New Member
New Member
Posts:26


--
09/10/2009 3:33 PM

Just checked…

There are no “null” or empty fields in the LastModified column.

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/11/2009 5:42 PM
Hi Shelly,

Are you using any custom attrributes? If so, what type? And are they folder bound or portal wide?

Peter
shelly campbell
New Member
New Member
Posts:26


--
09/11/2009 9:20 PM

As far as we know, there are no custom attributes configured. The client is getting more search result errors with the "DBNull to type Date not valid". Not sure how to troubleshoot this issue and it doesn't happen on our instance of the site. After we migrated the site to the client, these errors have been coming up.

Thanks for your help Peter.

Shelly

shelly campbell
New Member
New Member
Posts:26


--
09/11/2009 9:37 PM

Apparently these errors are coming up immediately or when you select page 2 of the results.

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/12/2009 10:23 AM
Hi Shelly,

You'll need to check the event log of the site to see if the error is listed there. Note it is hard for me to debug an error I can't reproduce. But maybe the event log will give me a hint.

Peter
shelly campbell
New Member
New Member
Posts:26


--
09/16/2009 7:04 PM

Here is the event log message after a search error is thrown. Not sure if this helps or not.

9/16/2009 12:46:27 PM  Page Load Exception  CSGCORP\GaulD    AssemblyVersion: 04.09.03; PortalID: 0; PortalNa ...

AssemblyVersion
PortalID: 0
PortalName: CSG Insider
UserID: 7
UserName: CSGCORP\GaulD
ActiveTabID: 130
ActiveTabName: Search Results DMX
RawURL: /SearchResultsDMX/tabid/130/Default.aspx?xsq=1.302
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://insider.csgonline....abid/37/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: d0a6222b-cd9f-4a87-9796-22c0dde487ef
InnerException: Conversion from type 'DBNull' to type 'Date' is not valid.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: Microsoft.VisualBasic.CompilerServices.Conversions.ToDate
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Conversion from type 'DBNull' to type 'Date' is not valid. ---> System.InvalidCastException: Conversion from type 'DBNull' to type 'Date' is not valid. at Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(Object Value) at ASP.desktopmodules_bring2mind_dmx_search_ascx.__DataBinding__control14(Object sender, EventArgs e) at System.Web.UI.Control.OnDataBinding(EventArgs e) at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.Control.DataBindChildren() at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) at System.Web.UI.WebControls.DataGrid.CreateItem(Int32 itemIndex, Int32 dataSourceIndex, ListItemType itemType, Boolean dataBind, Object dataItem, DataGridColumn[] columns, TableRowCollection rows, PagedDataSource pagedDataSource) at System.Web.UI.WebControls.DataGrid.CreateControlHierarchy(Boolean useDataSource) at System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) at Bring2mind.DNN.Modules.DMX.Search.
() at Bring2mind.DNN.Modules.DMX.Search.(Object A_0, EventArgs A_1) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
Source:
Server Name: CSGWEB01
: 04.09.03

 

shelly campbell
New Member
New Member
Posts:26


--
09/16/2009 10:43 PM

Could this issue have anything to do with moving the site from SQL 2005 to SQL 2008?

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
09/17/2009 1:20 PM
Hi Shelly,

I doubt it's anything to do with SQL 2008. But there is a date somewhere that is null that shouldn't be. The only date that is shown in the search.ascx is LastModified. So there has to be a record that has that error I think. What does the following SQL return:
SELECT * FROM DMX_Entries WHERE LastModified IS NULL

Peter
shelly campbell
New Member
New Member
Posts:26


--
09/17/2009 6:54 PM

Hi Peter,

Thanks for your help! There WAS a record in the DMX_Entries table with the LastModified field set to NULL (we were finally able to check that for ourselves ;-) ). We corrected it and the search works as it should now. Just not quite sure how that field got to be NULL in the first place. It happened after the site was moved to the client's server.

Shelly

You are not authorized to post a reply.