Witam! Po przekonwetowaniu pisanej aplikacji w VS2008 do VS2010, w czasie jej działania(po skompilowaniu pod VS 2010) nie mogę wyświetlić żadnego DataGrid'a z zawartoscią której kolwiek z tabel bazy danych podłączonej do projektu. Treść błędu brzmi
"Działanie podstawowego dostawcy nie powiodło się przy wykonywaniu operacji Open"
i podświetlona zostaje definicja BidningSource'a dla tej tabeli.
Piszę o tym tutaj, bo po przegladnięciu dokumentacji nic wiele to nie dało. Moze ktoś z was będzie wiedział jak to rozwiązać. Dane na temat podłączenia do bazy danych w właściwościach są zmienione a mimo to błąd nadal wystepuje. Musiałem je zmienić z racji że jeden projekt nad którym pracuje został przeniesiony z jednego komputera na drugi, który ma VS2010 a nie VS2008 i potrzebna była migracja.
Dorzucam jeszcze szczegóły tego błędu, któy w dalszym ciągu występuje:
System.Data.EntityException was unhandled
Message=Działanie podstawowego dostawcy nie powiodło się przy wykonywaniu operacji Open.
Source=System.Data.Entity
StackTrace:
w System.Data.EntityClient.Entity
Connection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
w System.Data.EntityClient.EntityConnection.Open()
w System.Data.Objects.ObjectContext.EnsureConnection()
w System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
w System.Data.Objects.ObjectQuery`1.GetIListSourceListInternal()
w System.Windows.Forms.ListBindingHelper.GetList(Object list)
w System.Windows.Forms.ListBindingHelper.GetList(Object dataSource, String dataMember)
w System.Windows.Forms.BindingSource.ResetList()
w System.Windows.Forms.BindingSource.set_DataSource(Object value)
w BudSystem.ClassLogowanie.getLogin() w C:\Users\Szymon\Desktop\praca inż\aplikacja_BudSystem\BudSystem\ClassLogowanie.cs:wiersz 15
w BudSystem.FormLogowanie.buttonZaloguj_Click(Object sender, EventArgs e) w C:\Users\Szymon\Desktop\praca inż\aplikacja_BudSystem\BudSystem\FormLogowanie.cs:wiersz 27
w System.Windows.Forms.Control.OnClick(EventArgs e)
w System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
w System.Windows.Forms.Control.WmMouseUp(Message&; m, MouseButtons button, Int32 clicks)
w System.Windows.Forms.Control.WndProc(Message&; m)
w System.Windows.Forms.ButtonBase.WndProc(Message&; m)
w System.Windows.Forms.Button.WndProc(Message&; m)
w System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&; m)
w System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
w System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&; msg)
w System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
w System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
w System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
w BudSystem.Program.Main() w C:\Users\Szymon\Desktop\praca inż\aplikacja_BudSystem\BudSystem\Program.cs:wiersz 19
w System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
w Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
w System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
w System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Data.SqlClient.SqlException
Message=Wystąpił błąd związany z siecią lub wystąpieniem podczas ustanawiania połączenia z serwerem programu SQL Server. Nie można odnaleźć serwera lub jest on niedostępny. Sprawdź, czy nazwa wystąpienia jest poprawna i czy konfiguracja serwera programu SQL Server zezwala na połączenia zdalne. (provider: Dostawca nazwanych potoków, error: 40 - Nie można otworzyć połączenia z programem SQL Server)
Source=.Net SqlClient Data Provider
ErrorCode=-2146232060
Class=20
LineNumber=0
Number=3
Server=""
State=0
StackTrace:
w System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
w System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
w System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
w System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
w System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
w System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
w System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
w System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
w System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
w System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
w System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
w System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
w System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
w System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
w System.Data.SqlClient.SqlConnection.Open()
w System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
InnerException: