تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
أريد تحويل مشروعي من اكسس الى sql
#6
(26-12-14, 03:09 PM)Dr.Sherif Alazizi كتب : Connection to SQL Server failed
a network -related or instance -specific error occured while establishing  a connection to SQL Server  , the server was not fount or was not accessible  ,  verify that the instance name is correct and that SQL Server is configured to allow  remote connections  .( provider : Nammed Pipes Provider , error : 40 - could not open a conection to SQL Server

مع العلم اني استخدمت نفس الاعدادات الموجوده في الشرح بالفيديو

جزاكم الله خيرا اخي الكريم

إذا كنت تتصل من خارج الشبكة او داخلها ولاكن من خلال جهاز اخر اتبع التعليمات التالية ( فتح البورتات في جدار الحماية تفعيل الموارد المعطلة تبع السيرفر ...)

إقتباس :Step 1:    First Step check your SQL services are running fine.


Step 2:    Click on “Start Window” and expand “Microsoft SQL Server 2008 R2” and click on “SQL Server Configuration Manager”.


[صورة مرفقة: SQL-Server-Configuration-Manager.png]

Step 3:   Now click on left pane “SQL Server Services” and check for “SQL Server (SQLEXPRESS)” running or not, if it is in green color then it’s working fine.




[صورة مرفقة: SQL-Express.png]



Step 4:  Now check for “SQL Server (MSSQLSERVER)”, it should be in green color means running fine.

[صورة مرفقة: SQL-Server-MSSQLServer.png]

Step 5: Now check for “SQL Server Browser” running or not, you have to make sure is green marked.



[صورة مرفقة: SQL-Browser-Running.png]


Step 6: Now click on “Aliases“ left pane, make assure on right pane that  there should be empty aliases, if requires then should recreate from fresh.


[صورة مرفقة: Aliases.png]

Step 7: Now check for SQL Server Default Portal 1433, if you have not already added then follow to open “Ctrl + R”, type “Firewall.cpl” then Firewall will open and Click on “Advanced Settings”.


[صورة مرفقة: Advanced-Settings.png]


Step 8:
Click on “Inbound Rules” in left pane and click on right pane “New Rule”.


[صورة مرفقة: New-Rule.png]


Step 9: Then Click on “Protocol and Ports” and click on “Specific local ports” and write SQL default Port No “1433”.


[صورة مرفقة: Protocol-Ports.png]



Step 10: Now write name on SQL Port Name and click on “Finish” button.

 [صورة مرفقة: SQL-Port-Name.png]

Step 11: Now click on “Client Protocols” in left pane, next click on right pane “TCP/IP” and click on “Property” then you check that your default Port “1433” has been populated.


[صورة مرفقة: sql-Port-1433.png]




Step 12: Now Open “SQL Server Management Studio” and right click, now property window open and click on “Property”.


[صورة مرفقة: SQL-Server-Management-Studio.png]

Step 13: Now click on “Connections” option and Check option “Allow remote connections to this server” and click now on “OK”.



[صورة مرفقة: Allow-Remote-Connections.png]

Step 14: You have to Ping for your IP Host Address on your command prompt  "cmd" console.


[صورة مرفقة: Ping-IP-Host.png]

Step 15: Check for Firewall blocking SQL Server Port 1433

Hope above steps will eradicate your problem permanently Could not open a connection to SQL Server and work as per your expectations seamlessly.


ثم عرف متغير عام


إقتباس :Public con As New SqlConnection


ثم جرب الاتصال من خلال جملة الاتصال التالي


 
إقتباس :
Try
            kCon.ConnectionString = "Data Source=" + TextSER.Text.Trim + ";Initial Catalog=" + TextDA.Text.Trim + ";User ID= " & TextUSER.Text.Trim & ";Password=" & TextPASS.Text.Trim & ""
            kCon.Open()
            MsgBox("نجح الاتصال بقاعدة البيانات")
            kCon.Close()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
TextSER.Text.Trim اسم السيرفر
TextDA.Text.Trim قاعدة البيانات
TextUSER.Text.Trim اسم المستخدم
TextPASS.Text.Trim الباسورد



وطريقة عمل اسم المستخدم من خلال السيرفر اتبع الصور بالمرفقات .......


الان يلزم ايقاف السيرفر واعادة تشغيله من خلال لوحة التحكم > ادوات الادمن > ثم الخدمات وافعل التالي








ثم تاكد ان جميع خدمات السيرفر تعمل بشكل تلقائي ولا يوجد أي برنامج يحجبها كجدار الحماية




اما إذا كان الاتصال داخلي
تاكد من عمل خدمات السيرفر فاغلب مشاكله الصلاحيات او السماحيات



Heart


الملفات المرفقة صورة/صور
                       
الرد }}}
تم الشكر بواسطة: a_almisery , nabil1982


الردود في هذا الموضوع
RE: أريد تحويل مشروعي من اكسس الى sql - بواسطة alktab - 27-12-14, 01:33 AM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  مساعدة في تحويل الكود من فيجوال بسيك 6 الى فيجوال دوت نت سيد أحمد 5 821 23-03-25, 10:54 PM
آخر رد: سيد أحمد
  ادخال درجات الطلاب لقاعدة بيانات اكسس .. مساعدة Tajaldeen 9 2,751 07-02-25, 07:59 PM
آخر رد: الورد2
  كيف يمكن تحويل ملف تنفيذى الى فيجوال بيسك 2010 walkady 2 782 07-02-25, 07:57 PM
آخر رد: الورد2
  طريقه تحويل اى قاعده بيانات الى ملف dll فى المشروع خالد كامل1 1 636 31-01-25, 10:21 PM
آخر رد: Kamil
  تحويل معادلة اكسل أحمد فتح الرحمن 1 478 29-01-25, 11:09 PM
آخر رد: أحمد فتح الرحمن
  اريد كود يحذف جميع سجلات جدول بقاعدة بيانات اكسس دفعه واحده khalidalwdi 2 640 18-11-24, 01:02 AM
آخر رد: rdxdz
  اريد جلب عدد محدد من السجلات من قاعدة بيانات اكسس الى الداتا قراد فيو يوجد مثال khalidalwdi 2 668 12-11-24, 12:19 PM
آخر رد: khalidalwdi
  [VB.NET] تحويل لغة الأرقام في فيجوال ستوديو AboBattal 2 391 12-11-24, 08:11 AM
آخر رد: أبو خالد الشكري
  لدي كود للإضافة أريد كود للتعديل وكود للحذف F.H.M 4 357 09-11-24, 09:50 AM
آخر رد: F.H.M
  [VB.NET] تحويل من hexadecimal الى ASCII aminesori 2 371 07-11-24, 11:18 PM
آخر رد: aminesori

التنقل السريع :


يقوم بقرائة الموضوع: