PDA

View Full Version : مبتدی: تغییر کانکشن MainData.xsd در پروژه و استفاده از SQLExpress



kitcat_m18
یک شنبه 23 اسفند 1394, 14:47 عصر
سلام ، من یه پروزه دارم که به صورت ویزاردی از پایگاه داده استفاده کردم
الان که می خوام رو یه سیستم دیگه اجراش کنم مسیر کانکشن استرینگ رو نمی تونم تغییر بدم
من کلا تو فرمم یه DataSet دارم، یه TableAdapterو یه BindingSource
متاسفانه نمی دونم چجوری باید با کد نویسی مسیر دیتابیس رو ست کنم

دوستان کسی قبلا این کارو انجام داده؟

139583

kitcat_m18
یک شنبه 23 اسفند 1394, 16:22 عصر
شرح خطا رو هم میذارم ببینین

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentException: Invalid value for key 'attachdbfilename'.
at System.Data.SqlClient.SqlConnectionString.VerifyLo calHostAndFixup(String& host, Boolean enforceLocalHost, Boolean fixup)
at System.Data.SqlClient.SqlConnectionString..ctor(St ring connectionString)
at System.Data.SqlClient.SqlConnectionFactory.CreateC onnectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetCo nnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.SqlClient.SqlConnection.ConnectionStri ng_Set(String value)
at SamanehyeSabteFatemiyoon.MainDataTableAdapters.Per sionTableAdapter.InitConnection() in c:\Users\CyberEagle\Documents\Visual Studio 2012\Projects\SamanehyeSabteFatemiyoon\SamanehyeSa bteFatemiyoon\MainData.Designer.cs:line 2103
at SamanehyeSabteFatemiyoon.MainDataTableAdapters.Per sionTableAdapter.get_Connection() in c:\Users\CyberEagle\Documents\Visual Studio 2012\Projects\SamanehyeSabteFatemiyoon\SamanehyeSa bteFatemiyoon\MainData.Designer.cs:line 1953
at SamanehyeSabteFatemiyoon.MainDataTableAdapters.Per sionTableAdapter.InitAdapter() in c:\Users\CyberEagle\Documents\Visual Studio 2012\Projects\SamanehyeSabteFatemiyoon\SamanehyeSa bteFatemiyoon\MainData.Designer.cs:line 2064
at SamanehyeSabteFatemiyoon.MainDataTableAdapters.Per sionTableAdapter.get_Adapter() in c:\Users\CyberEagle\Documents\Visual Studio 2012\Projects\SamanehyeSabteFatemiyoon\SamanehyeSa bteFatemiyoon\MainData.Designer.cs:line 1942
at SamanehyeSabteFatemiyoon.MainDataTableAdapters.Per sionTableAdapter.Fill(PersionDataTable dataTable) in c:\Users\CyberEagle\Documents\Visual Studio 2012\Projects\SamanehyeSabteFatemiyoon\SamanehyeSa bteFatemiyoon\MainData.Designer.cs:line 2202
at SamanehyeSabteFatemiyoon.Frm_Main.Frm_Main_Load(Ob ject sender, EventArgs e) in c:\Users\CyberEagle\Documents\Visual Studio 2012\Projects\SamanehyeSabteFatemiyoon\SamanehyeSa bteFatemiyoon\Frm_Main.cs:line 24
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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5477 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
SamanehyeSabteFatemiyoon
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/CyberEagle/Documents/Visual%20Studio%202012/Projects/SamanehyeSabteFatemiyoon/SamanehyeSabteFatemiyoon/Debug/SamanehyeSabteFatemiyoon.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data.DataSetExtensions
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Data.DataSetExtensions/3.5.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.