LinqConnect Professional Version 4.8.1350 (30-Oct-2017) - error when create context for MS SQL
Posted: Fri 24 Nov 2017 15:38
After updating the components from LinqConnect Professional Version 4.5.1024 (07-Jul-2016) to LinqConnect Professional Version 4.8.1350 (30-Oct-2017) get connection open error when create context.
ATTENTION! I did not need to connect to the database, I just had to create a context. To use it to check the existence of a database by a command (context.DatabaseExists()), and to create it as a command (context.CreateDatabase()) if necessary.
Now began to appear errors with such stacktrace:
As you can see after creating the context:
for some reason, there is an attempt to connect to the database.
Because of this, an exception is thrown and the context is not created.
Connection string:
This problem appeared only with MS SQL Server, with other types of database is not observed.
PS: This problem is very serious, I have broken the functionality to create a database. Very much I ask to help or assist as soon as possible.
ATTENTION! I did not need to connect to the database, I just had to create a context. To use it to check the existence of a database by a command (context.DatabaseExists()), and to create it as a command (context.CreateDatabase()) if necessary.
Now began to appear errors with such stacktrace:
Code: Select all
System.Data.SqlClient.SqlException was caught
HResult=-2146232060
Message=Не удается открыть базу данных "cetest", запрашиваемую именем входа. Не удалось выполнить вход.
Ошибка входа пользователя "sa".
Source=.Net SqlClient Data Provider
ErrorCode=-2146232060
Class=11
LineNumber=65536
Number=4060
Procedure=""
Server=10.5.5.199
State=1
StackTrace:
в System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
в System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
в System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
в System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
в System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
в System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
в System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
в System.Data.SqlClient.SqlConnection.Open()
в Devart.Data.SqlServer.Linq.Provider.SqlDataProvider.Initialize(Object connection)
в Devart.Data.Linq.DataProvider.a(IDataServices A_0, Object A_1)
в Devart.Data.Linq.DataContext.a(Object A_0, MappingSource A_1, Type A_2, String A_3, Boolean A_4)
в Devart.Data.Linq.DataContext..ctor(String connectionString, MappingSource mapping)
в ceData.Context.ceDataContext..ctor(String connection, MappingSource mappingSource) в d:\Repository\mvp\trunk\source\ceModules\ceData.Context\ceDataContext.Designer.cs:строка 387
в ceData.Context.SqlClientCeDataContext..ctor(String connection, MappingSource mappingSource) в d:\Repository\mvp\trunk\source\ceModules\ceData.Context\ceCommon.cs:строка 226
в ceData.Context.Service.CreateDataContext(String sProviderPrefix, String sConnectionString, Boolean bOpenAfterCreate) в d:\Repository\mvp\trunk\source\ceModules\ceData.Context\ceCommon.cs:строка 118
в ceDataSource.Model.DataSource.CreateDataContext(String sProviderPrefix, String sConnectionString, Boolean bOpenAfterCreate, Boolean bKeepUpConnectionActive) в d:\Repository\mvp\trunk\source\ceModules\ceDataSource.Model\DataSource.cs:строка 2019
InnerException:
Code: Select all
в Devart.Data.SqlServer.Linq.Provider.SqlDataProvider.Initialize(Object connection)
в Devart.Data.Linq.DataProvider.a(IDataServices A_0, Object A_1)
в Devart.Data.Linq.DataContext.a(Object A_0, MappingSource A_1, Type A_2, String A_3, Boolean A_4)
в Devart.Data.Linq.DataContext..ctor(String connectionString, MappingSource mapping)
Code: Select all
в System.Data.SqlClient.SqlConnection.Open()
Connection string:
Code: Select all
data source=10.5.5.199;initial catalog=cedatabase;integrated security=False;persist security info=False;Pooling=False;connect timeout=15;user id=sa;password=***********
PS: This problem is very serious, I have broken the functionality to create a database. Very much I ask to help or assist as soon as possible.