Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi

                                    the following query
                                                var activeStore = (from s in new XPQuery<BaseObjects.XpoDictionaryDifferenceStore>(session)
                                                                   where s.Active && s.Aspect == str
                                                                   select s).Take(1).FirstOrDefault();
                                                return activeStore;
                                    produces

                                    Executing Sql 'select top 1 N0."Oid",N0."Aspect",N0."Active",N0."XmlContent",N0."OptimisticLockField",N0."GCRecord" from "dbo"."XpoDictionaryDifferenceStore" N0
                                    where (N0."GCRecord" is null and N0."Active" and (N0."Aspect" = @p0))' with parameters '{(Default language)}' exception 'System.Data.SqlClient.SqlException: An expression of non-boolean type specified in a context where a condition is expected, near 'and'.
                                       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
                                       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
                                       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
                                       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
                                       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
                                       at System.Data.SqlClient.SqlDataReader.get_MetaData()
                                       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
                                       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
                                       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
                                       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
                                       at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
                                       at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
                                       at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
                                       at DevExpress.Xpo.DB.ConnectionProviderSql.InternalGetData(IDbCommand command, CriteriaOperatorCollection targets, Int32 topClause)
                                       at DevExpress.Xpo.DB.ConnectionProviderSql.SelectData(Query query, CriteriaOperatorCollection targets)'

                                    but this one passes
                                                var activeStore = (from s in new XPQuery<BaseObjects.XpoDictionaryDifferenceStore>(session)
                                                                   where s.Active== true && s.Aspect == str
                                                                   select s).Take(1).FirstOrDefault();
                                                return activeStore;

                                0

                                forgotten?

                                0

                                come on xpo team whats going on over there
                                could u please confirm this bug

                                0

                                Hello Apostolis,

                                Thank you for the message. You must have received a notification about the fact that we have managed to reproduce this problem. Our developers have researched this issue and come to the conclusion that this behavior is by design. The XPO, like any DBMS, doesn't allow mixing Boolean conditions with Boolean property values. In other words a similar SQL statement cannot be executed on the server. Anyway, I have converted this bug to a suggestion and we'll consider improving the current behavior in the future.

                                Thanks,
                                Stan.

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Your Privacy - Legal Statements

                                Copyright © 1998-2013 Developer Express Inc.
                                ALL RIGHTS RESERVED
                                All trademarks or registered trademarks
                                are property of their respective owners