اتصال به پایگاهی با ادرس \\192.168.100.100\Debug\Database1.mdf
.سلام من دو کامپوتر رو با کابل شبکه وصل کردم.
A ip=192.168.100.100
B ip=192.168.100.101
روی کامپیوتر A و B اسکویل اکسپرس نصب هستش همونی همرا ویژوال 2008 با سی دی نصب می شه.
پوشه Debug برنامه رو در کامپیوتر A شیر کردم .
حالا می خوام از کامپیوتر B برنامه رو اجرا کنم.
برنامه به راحتی اجرا می شه ولی وقتی نوبت به پایگاه داده می رسه به فایل دیتا بیس گیر می ده و میگه در مسیر نیست.
رشته اتصال من اینه روی کامپوتری A درست کار می کنه ولی روی کامپوتر B خطا می ده
Server=.\SQLEXPRESS;AttachDbFilename='C:\…\Debug \Database1.mdf';Initial Catalog=;Integrated Security=True;Connect Timeout=30;User Instance=True
رشته اتصال رو در کامپیوتر B به شکل زیر کردم میسر بانک در شبکه ولی بازهم خطا دراه.
Server=.\SQLEXPRESS;AttachDbFilename='\\192.168.10 0.100\Debug\Database1.mdf';Initial Catalog=;Integrated Security=True;Connect Timeout=30;User Instance=True
به نظر شما باید چی کار کنم؟
آیا مسیر بانک در شبکه مشکل داره.
رشته اتصال اولی که فقط کافی بود مسیر مشخص بشته چرا تو رشته اتصال دوم این روش با خطا مواجح می شه؟
نقل قول: اتصال به پایگاهی با ادرس \\192.168.100.100\Debug\Database1.mdf
تو قسمت سرور از استرینگ ادرس سرورو بزن
نقل قول: اتصال به پایگاهی با ادرس \\192.168.100.100\Debug\Database1.mdf
دیتابیس sql رو اینطوری توی شبکه شیر نمیکنند.
باید از sqlserver همونطوری که بقیه استفاده میکنند استفاده کنید.
جست و جو کنید.
نقل قول: اتصال به پایگاهی با ادرس \\192.168.100.100\Debug\Database1.mdf
نقل قول:
نوشته شده توسط
FastCode
دیتابیس sql رو اینطوری توی شبکه شیر نمیکنند.
باید از sqlserver همونطوری که بقیه استفاده میکنند استفاده کنید.
جست و جو کنید.
خیلی ممنون درسته باید sqlنصب بشته بعد یه کاربر تعریف بشه و بعد با اون کاربر و آپی سرور به به دیتا بیس نصب بشود.
الان برنامه من با رشته اتصال Database1ConnectionString که در Settings.settings برنامه ذخیره می شده مشکل داره
این رشته با مقادر زیر مقادر دهی شده است
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirector y|\Database1.mdf;Integrated Security=True;User Instance=True
در صورتی که رشته اتصال من فرق داره داخل رویداد فرم لود هم کدها زیر خطا دارد.
Properties.Settings.Default.MdfPincerConnectionStr ing = "......";
متن خطا
cannot be assigned to -- it is read only
این رشته اتصال برای DataSet1.xsd هستش
حلا چطوری رشته اتصال DataSet1.xsd رو تغییر بدهم ؟
نقل قول: اتصال به پایگاهی با ادرس \\192.168.100.100\Debug\Database1.mdf
مربوط به مسائل شبکه و دسترسی ها میشه
پوشه ای که دیتابیس توش قرار گرفت به کاربر B تمام دسترسی ها رو نداده و باید FullControl باشه.