+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

5 posts, 0 answered
  1. OC
    OC avatar
    129 posts
    Registered:
    17 Nov 2004
    30 May 2008
    Link to this post

    The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.

    Source Error:

    Line 38:             plhDashboardItems.Controls.Clear();
    Line 39: 
    Line 40:             foreach (IPersonalizedDashboardItem item in GlobalDashboardItems.Instance.DashboardItems)
    Line 41:             {
    Line 42:                 plhDashboardItems.Controls.Add((WebControl)item);

    Source File: i:\Program Files\telerik\Sitefinity3.2\WebSites\Emdal3.2\Sitefinity\Admin\Default.aspx.cs    Line: 40

    Stack Trace:

    [SqlException (0x80131904): The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
       System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
       System.Data.SqlClient.SqlDataReader.get_MetaData() +62
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
       System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
       System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +9
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.EndStatement(SQLCommandEventArgs args, DataRow row) +389
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.EmitQuery(StmtContext context, DataRow queryData, Int32 maxRows, String groupName) +1416
       Nolics.ORMapper.DataProviders.SQLBlockBuilder.ExecuteQuery(StmtContext context, DataRow queryData, Int32 maxRows, String group) +106
       Nolics.ORMapper.DataProviders.SQLDataProvider.ExecQuery(DataSet queries) +519
       Nolics.ORMapper.Base.QueryBase`1.LoadQuery(Int32 maxElements, Int32 fromElement) +275
       Nolics.ORMapper.Base.QueryBase`1.LoadAll() +20
       Telerik.Forums.Data.DefaultProvider.GetPostsByAuthor(String authorName) +129
       Telerik.Forums.ForumsModule.GetRecentPosts(Int32 rowPerPage, String postedBy) +373
       Telerik.Forums.ForumsModule.GetRecentItems(String userName, Int32 count) +103
       Telerik.Forums.ForumsModule.GetRecentItems(Int32 count) +38
       Telerik.Cms.Web.UI.Personalization.GlobalDashboardItems.GetRecentChanges(Int32 rowPerPage) +527
       Telerik.Cms.Web.UI.Personalization.GlobalDashboardItems.get_DashboardItems() +258
       Admin_Default.LoadDashboardRecentItems() in i:\Program Files\telerik\Sitefinity3.2\WebSites\Emdal3.2\Sitefinity\Admin\Default.aspx.cs:40
       Admin_Default.OnLoad(EventArgs e) in i:\Program Files\telerik\Sitefinity3.2\WebSites\Emdal3.2\Sitefinity\Admin\Default.aspx.cs:70
       System.Web.UI.Control.LoadRecursive() +47
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
    

    This error occurs when upgrading projects to 3.1 and 3.2 on SQL server 2000. (Does not effect new installations).

    OC
  2. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    03 Jun 2008
    Link to this post
    Hi Ole,

    Unfortunately, we cannot reproduce these exceptions.
    But it seems it is related to some of the data in your database. Is it possible for you to send us your database, so we could investigate it locally. You can attach it to a new support ticket.

    Sorry for the inconvenience and thank you for the cooperation in advanced.

    Best wishes,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. OC
    OC avatar
    129 posts
    Registered:
    17 Nov 2004
    04 Jun 2008
    Link to this post
    Database prior to upgrade posted to new support ticket.
  4. Stefano
    Stefano avatar
    4 posts
    Registered:
    15 Feb 2008
    05 Jun 2008
    Link to this post
    I Have some problem...
    Error accour after import to sql 2000 from SQL 2005 before sp2 and sql2005 does not problem.

    I have conect e new project to the sql 2000 db end the error occour selecting newsletter menu in admin area !

    Best regard.

    You can download db copy from hear: www.my-dna.it/db.rar
  5. Vlad
    Vlad avatar
    498 posts
    Registered:
    15 Jul 2016
    06 Jun 2008
    Link to this post
    Hello Stefano,

    It seems this is a bug in the Newsletter module with SQL Server 2000. Thank you for reporting it, we will fix it as soon as possible. We have updated your Telerik points.

    For the time being you can run the following SQL script into your database, to continue with the newsletter:

    alter table sf_Notif_Newsletter drop column FailedMessage 
    alter table sf_Notif_Newsletter add FailedMessage nvarchar(200) null 
    alter table sf_Notif_Newsletter drop column PausedEmailList 
    alter table sf_Notif_Newsletter add PausedEmailList nvarchar(1000) null 

    However, this exception is not related to the error reported in the first post.

    Greetings,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
5 posts, 0 answered