PDA

View Full Version : سوال: خطا در اتصال به بانک اطلاعاتی - علت خطای A network-related or instance-specific error occurred



majid216
دوشنبه 17 شهریور 1393, 16:05 عصر
سلام لطفا کمک کنید سه روز دارم سرچ می زنم هر چی روش هم پیدا کردم امتحان کردم جواب نگرفتم
برنامه ای با linq نوشته ام ویندوز من 8 و 64بیتی می باشد حال برای برنامه setup تهیه کردم و آنرا در کامپیوتری با ویندوز 7 و 32بتی نصب کردم در این سیستم sql را نصب کردم و بانک اطلاعاتی را به صورت دستی اتچ کردم که کاملا انجام شد
حالا وقتی برنامه را اجرا می کنم و می خواهم عمل درج، حذف و ... را انجام دهم در بعضی از قسمت ها Error 40 می دهد و در بعضی قسمتها Error 26 می دهد. واقعا گیج شده ام.

parvizwpf
دوشنبه 17 شهریور 1393, 16:40 عصر
متن اون ارور ها چه هستند؟

majid216
دوشنبه 17 شهریور 1393, 17:08 عصر
از error ها عکس گرفتم ولی نمی توانم روی تاپیک بگذارم نمی دانم چرا می شه راهنمایم کنی

parvizwpf
دوشنبه 17 شهریور 1393, 17:15 عصر
ببینید شما اول سعی کنید که متن ارور ها رو بدید. در درجه بعد من فکر میکنم که شما با connection string مشکل دارید باید این قسمت رو داینامیک کنید که خودتون تو سیستم مشتری اونرو بدید.

majid216
دوشنبه 17 شهریور 1393, 21:15 عصر
Microsoft .NET Framework
Unhandled exception has occurred in your application. If you click continue. The application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
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: Name Pipes Provider, error: 40- Could not open a connection to SQL Server)
و
طرف حساب جدید
Unhandled exception has occurred in your application. If you click continue. The application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
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: SQL Network Interfaces, error: 26- Error Locating Server/Instance Specified).

fakhravari
دوشنبه 17 شهریور 1393, 21:24 عصر
A network-related or instance-specific error occurred while establishing a connection to SQL Server.
user , pass
در کل رشته اتصال خرابه

majid216
دوشنبه 17 شهریور 1393, 21:33 عصر
یعنی باید چه کاری انجام دهم لطفا راهنمایم کنید واقعا خسته شدم

fakhravari
دوشنبه 17 شهریور 1393, 21:50 عصر
<connectionStrings> <add name="ConnectionString1" connectionString="user id=fakhr;pwd=121789;data source=ip;persist security info=False;initial catalog=fakhravary;Min Pool Size=100;Max Pool Size=100;Connect Timeout=100;" providerName="System.Data.SqlClient" />

</connectionStrings>

majid216
دوشنبه 17 شهریور 1393, 21:58 عصر
ایراد کانکشن زیر مگه چیست؟
<add name="WindowsFormsApplication2.Properties.Settings.datab ase_hesabdaryConnectionString" connectionString= "Data Source=.;Initial Catalog=database_hesabdary;Integrated Security=True; pooling=False; User Instance=True"
providerName="System.Data.SqlClient" />