У меня довольно большая таблица (более 20 столбцов) на SQL Server 2008. Я использую Microsoft SQL Server Management Studio, чтобы открыть представление дизайна таблиц и добавить столбец. После добавления столбца я перемещаю его вверх в сортировке столбцов.
На рисунке ниже показан столбец, который я добавил, и куда я пытаюсь переместить его, просто перетащив его на несколько мест вверх.
После того, как я это сделал, я получаю исключение, когда пытаюсь открыть сайт. Все отлично работает, когда я добавляю столбец, не перемещая его вверх в сортировке столбцов.
Может кто-нибудь помочь мне разобраться с этой проблемой. Это ошибка на сервере MSSQL, в студии управления или что-то не так?
Исключение
Operand type clash: bit is incompatible with uniqueidentifier
Трассировка стека:
[SqlException (0x80131904): Operand type clash: bit is incompatible with uniqueidentifier]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
System.Data.SqlClient.SqlDataReader.HasMoreRows() +301
System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +422
NHibernate.Driver.NHybridDataReader.Read() +28
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +1383
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +114
NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +195
[ADOException: could not execute query
[ SELECT * from SomeFunction(@p0,@p1) ]
Name:Id - Value:3429fb7e-dba3-4c74-b41b-6f2e0bbb33f8 Name:Moment - Value:7-1-2011 12:16:45
[SQL: SELECT * from SomeFunction(@p0,@p1)]]
NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +637
NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) +23
NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) +438
NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) +373
NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters) +340
NHibernate.Impl.SqlQueryImpl.List() +258
CMS.ResourceAccess.DataAccessLogic.Repositories.NodeRepository.GetAncestors(Guid nodeId) in C:\Projects\Website\DataAccessLogic\Repositories\Repository.cs:228
CMS.Business.Components.Services.NodeService.GetAncestors(Guid nodeId) in C:\Projects\Website\DataAccessLogic\Repositories\Service.cs:921
CMS.Business.Components.Services.NodeService.GetSiteByNodeId(Guid nodeId) in C:\Projects\Website\DataAccessLogic\Repositories\Service.cs:1280
Plugin.Wysiwyg.Business.Components.Services.WysiwygSearchService.RebuildIndex() +1232
CMS.Business.Components.Services.SearchService.RebuildIndexForSites(IEnumerable 1 sites, ConfigurationManager configurationManager) in C:\Projects\Website\Services\Service.cs:303
CMS.Business.Components.Services.SearchService.RebuildIndex() in C:\Projects\Website\DataAccessLogic\Repositories\Service.cs:252
CMS.Backend.MvcApplication.Application_Start() in C:\Projects\Website\Global.asax.cs:49
[HttpException (0x80004005): could not execute query
[ SELECT * from SomeFunction(@p0,@p1) ]
Name:Id - Value:3429fb7e-dba3-4c74-b41b-6f2e0bbb33f8 Name:Moment - Value:7-1-2011 12:16:45
[SQL: SELECT * from SomeFunction(@p0,@p1)]]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +3988565
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375
[HttpException (0x80004005): could not execute query
[ SELECT * from SomeFunction(@p0,@p1) ]
Name:Id - Value:3429fb7e-dba3-4c74-b41b-6f2e0bbb33f8 Name:Moment - Value:7-1-2011 12:16:45
[SQL: SELECT * from SomeFunction(@p0,@p1)]]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11529072
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4784373
EDIT:
Я использую NHibernate как ORM