Although I have seen this in other builds including 4.2, currently we are running 5.2.1.0. Our database is SQL 2012. We have the code exposed using WCF TCP protocol hosted as a Windows service. The error doesn't happen often but it has happened maybe 6 times in the last year. Some code that uses QuerySpec (self service) starts throwing these errors. It is like the code is looking at a different database or something. We have to restart the windows service to clear up the errors.
The code that throws the errors is located in specific entity classes, in the user code region.
The error handler that catches this is able to connect to the database and lookup the user login name, so the database is there and can be connected to.
It is a pretty random error, just wondering if you have seen anything like this or have any suggestions. Stack shown below, where "Database.TableName.FieldName" is different and corresponds to a specific field in the query.
The multi-part identifier "Database.TableName.FieldName" could not be bound. Exception Attributes:
Message: The multi-part identifier "Database.TableName.FieldName" could not be bound.
Exception type: System.Data.SqlClient.SqlException
Source: .Net SqlClient Data Provider
Thrown by code in method: OnError
Thrown by code in class: SqlConnection
Stack Trace:
Method: System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) Method: System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) Method: System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) Method: System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() Method: System.Data.SqlClient.SqlDataReader.get_MetaData() Method: System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption) Method: System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) Method: System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) Method: System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) Method: System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) Method: SD.LLBLGen.Pro.ORMSupportClasses.RetrievalQuery.Execute(CommandBehavior behavior)