could not execute query [ SELECT this_.Id as Id10_0_, this_.SerialNumber as SerialNu2_10_0_ FROM Settings_ShellDescriptorRecord this_ WHERE 1=1 ]

Feb 8, 2011 at 2:11 PM

ADO Exception was unhandled by user code

could not execute query
[ SELECT this_.Id as Id10_0_, this_.SerialNumber as SerialNu2_10_0_ FROM Settings_ShellDescriptorRecord this_ WHERE 1=1 ]

I'm encountering this error when running the latest release (Orchard.Web.1.0.20), right after creating a site with user and password, site name, etc; and before getting to the initial home page.

This error is occurring in Orchard\Data\Repository.cs. Also, before receiving this error, I received a notice that this Repository.cs could not be found and i was given a browse dialog. I located the Repository.cs file in Orchard\Data in the Orchard.Source.1.0.20.

Thanks.

Coordinator
Feb 8, 2011 at 6:02 PM

Could you give the full call stack? Also, was Orchard able to create the tables in the database?

If you are using SqlServer, make sure the _database_ exists before running setup. Orchard is currently only able to create tables (i.e. not the database itself) for SqlServer installations.

Feb 8, 2011 at 8:17 PM

Sure. Here's what appears in the call stack. As for my database, I wasn't using one on that attempt as I selected a Compact DB creation. But I did create a database using SQL 2008 R2 Express and received the error still. In both scenarios, tables are successfully created by continuing beyond the error. I should note I'm running this from within VS2010 in debug mode.

 

Here's the stack trace:

     [External Code]   
    Orchard.Framework.DLL!Orchard.Data.Repository<Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord>.Get(System.Linq.Expressions.Expression<System.Func<Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord,bool>> predicate) Line 91 + 0x49 bytes    C#

 Orchard.Framework.DLL!Orchard.Data.Repository<Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord>.Orchard.Data.IRepository<T>.Get(System.Linq.Expressions.Expression<System.Func<Orchard.Core.Settings.Descriptor.Records.ShellDescriptorRecord,bool>> predicate) Line 60 + 0xe bytes    C#

     [External Code]