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

Bring2mind Forums

EntriesController.GetEntryByTitle bug
Last Post 05/27/2009 4:23 PM by Peter Donker. 2 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Avi Kleyman
New Member
New Member
Posts:4


--
05/27/2009 7:09 AM

Calling shared function EntriesController.GetEntryByTitle generates the following error:

"Object reference not set to an instance of an object."

SQL Trace captured the following SQL string:

SELECT * FROM (SELECT e.*, CAST (CASE WHEN e.LockedUntil > GETDATE() THEN 1 ELSE 0 END AS BIT) AS IsLocked, ext.ControlToLoad, ext.Custom, ext.DownloadUrl, ext.EntryTypes, ext.Icon16, ext.Icon32, ext.IsPrivate, ext.MimeType, ext.ResourceFile, ext.SettingsControl, ext.ViewByDefault, CAST(CASE WHEN (PATINDEX('Collection%',e.EntryType)>0) THEN 1 ELSE 0 END AS BIT) AS IsCollection, ISNULL((SELECT [Text] FROM dbo.DMX_LongTexts WHERE TypeKey='ENT' AND SubTypeKey='REMARKS' AND ObjectId=e.EntryId AND Locale='en-US'),  (SELECT [Text] FROM dbo.DMX_LongTexts WHERE TypeKey='ENT' AND SubTypeKey='REMARKS' AND ObjectId=e.EntryId AND Locale='')) Remarks, ISNULL((SELECT [Text] FROM dbo.DMX_ShortTexts WHERE TypeKey='ENT' AND SubTypeKey='TITLE' AND ObjectId=e.EntryId AND Locale='en-US'),  (SELECT [Text] FROM dbo.DMX_ShortTexts WHERE TypeKey='ENT' AND SubTypeKey='TITLE' AND ObjectId=e.EntryId AND Locale='')) Title FROM dbo.DMX_Entries e INNER JOIN dbo.DMX_Extensions ext ON e.EntryType=ext.ExtensionKey WHERE e.PortalId = 0) AS return WHERE Title = 'ROOT_0000000005'

Executing this command in SQL Management Studio returns the following error message:

Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'return

return is a reserved keyword.  Wrapping it in square brackets (e.g. [return]) solves the problem.

The SQL Server used for this website is SQL Server 2008 Standard.'

Avi Kleyman
New Member
New Member
Posts:4


--
05/27/2009 7:10 AM
Peter,

Can you release a hot fix to solve this issue for this function and any other that is being affected.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
05/27/2009 4:23 PM
Hi Avi,

Thanks for that. This will be fixed in the upcoming DMX 5.1. Should be out within a week.

Peter
You are not authorized to post a reply.