PDA

View Full Version : مشکل عجیب و غریب از دید بنده در اجرای برنامه وبانک اطلاعاتی



karbala
دوشنبه 14 مهر 1393, 06:45 صبح
مهندس های عزیز سلام بنده یه مشکلی دارم و تا الان نتونستم برطرفش کنم
بنده تمام مراحل اتچ کردن بانک رو انجام میدم و خدارو شکر تمام مراحل بدرستی انجام میشه و بانک هم متصل ولی در هنگام اجرای برنامه این خطارو میده مشکل از چیه دوستان عزیز ومهندس

System.Data.SqlClient.SqlException was unhandled
Message=A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Shared Memory Provider, error: 40 - Could not open a connection to SQL Server)
Source=.Net SqlClient Data Provider
ErrorCode=-2146232060
Class=20
LineNumber=0
Number=2
Server=""
State=0
StackTrace:
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.Att emptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.Log inNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.Ope nLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ct or(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateC onnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.Creat ePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateOb ject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCrea teRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConne ction(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetCo nnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenCo nnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Linq.SqlClient.SqlConnectionManager.Us eConnection(IConnectionUser user)
at System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe ()
at System.Data.Linq.SqlClient.SqlProvider.InitializeP roviderMode()
at System.Data.Linq.SqlClient.SqlProvider.System.Data .Linq.Provider.IProvider.Execute(Expression query)
at System.Data.Linq.Table`1.GetEnumerator()
at System.Data.Linq.Table`1.System.Collections.Generi c.IEnumerable<TEntity>.GetEnumerator()
at System.Collections.Generic.List`1..ctor(IEnumerabl e`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at System.Data.Linq.Provider.BindingList.Create[T](DataContext context, IEnumerable`1 sequence)
at System.Data.Linq.Table`1.GetNewBindingList()
at System.Data.Linq.Table`1.System.ComponentModel.ILi stSource.GetList()
at System.Windows.Forms.CurrencyManager.SetDataSource (Object dataSource)
at System.Windows.Forms.BindingContext.EnsureListMana ger(Object dataSource, String dataMember)
at System.Windows.Forms.DataGridView.DataGridViewData Connection.SetDataConnection(Object dataSource, String dataMember)
at System.Windows.Forms.DataGridView.OnBindingContext Changed(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContex tChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContex tChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChang ed(EventArgs e)
at System.Windows.Forms.Control.set_BindingContextInt ernal(BindingContext value)
at System.Windows.Forms.ContainerControl.get_BindingC ontext()
at System.Windows.Forms.Control.get_BindingContextInt ernal()
at System.Windows.Forms.Control.get_BindingContextInt ernal()
at System.Windows.Forms.DataGridView.DataGridViewData Connection.SetDataConnection(Object dataSource, String dataMember)
at System.Windows.Forms.DataGridView.set_DataSource(O bject value)
at Win_Sazman.FrmMain.FillGrid() in C:\Users\asus\Desktop\modiriat_Sazman-projed.ir_\Win_Sazman\Win_Sazman\FrmMain.cs:line 71
at Win_Sazman.FrmMain.FrmMain_Load(Object sender, EventArgs e) in C:\Users\asus\Desktop\modiriat_Sazman-projed.ir_\Win_Sazman\Win_Sazman\FrmMain.cs:line 23
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:

parvizwpf
دوشنبه 14 مهر 1393, 09:44 صبح
این خطا معمولا هنگامی که استرینگ کانکشن اشتباه باشه نشون داده میشه. باید مطمئن شوید که در سیستم فعلی هم، کانشکن همینی هست که میدید یا خیر.

karbala
دوشنبه 14 مهر 1393, 21:48 عصر
مرسی جناب پرویز خان کمک زیادی به من کردی گرچه مورد شما هم جزو مشکلات بود علاوه بر این پورت tcp/ip هم شمارش تغییر کرده بود در هر صورت هردو مشکل دخیل بودن دمت گزم مهندس