تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
الربط مع قاعدة البيانات SQL
#1
السلام عليكم ورحمة الله

حاليا انا اقوم بتطوير نظام صيدلية ..
النظام سوف يعمل على حاسبة واحدة فقط اي ليس عبر شبكة

ما هي افضل طريقة لعمل الاتصال بين قاعدة البيانات SQL server expess 2017 مع فيجول ستوديو 2022
الرد }}}
تم الشكر بواسطة:
#2
كود :
Standard Security
Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

Trusted Connection
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;


Connection to a SQL Server instance
The server/instance name syntax used in the server option is the same for all SQL Server connection strings.

Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;


Using a non-standard port
If your SQL Server listens on a non-default port you can specify that using the servername,xxxx syntax (note the comma, it's not a colon).

Server=myServerName,myPortNumber;Database=myDataBase;User Id=myUsername;Password=myPassword;
The default SQL Server port is 1433 and there is no need to specify that in the connection string.



Connect via an IP address
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
DBMSSOCN=TCP/IP is how to use TCP/IP instead of Named Pipes. At the end of the Data Source is the port to use. 1433 is the default port for SQL Server. Read more here.


SQL Server 7.0
Enable MARS
Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;MultipleActiveResultSets=true;


Attach a database file on connect to a local SQL Server Express instance
Server=.\SQLExpress;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;Database=dbname;Trusted_Connection=Yes;
Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection.


Attach a database file, located in the data directory, on connect to a local SQL Server Express instance
Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;
Why is the Database parameter needed? If the named database have already been attached, SQL Server does not reattach it. It uses the attached database as the default for the connection.

User Instance on local SQL Server Express
The User Instance feature is deprecated with SQL Server 2012, use the SQL Server Express LocalDB feature instead.

المصدر : https://www.connectionstrings.com
الرد }}}
تم الشكر بواسطة: نهى علي , mohamedassim


المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  تصدير البيانات إلى ملف RTF مصمم هاوي 4 820 15-08-25, 04:13 PM
آخر رد: أبو خالد الشكري
  [VB.NET] ما هو أفضل موقع استضافة لقواعد البيانات MSSQL ؟ mmaalmesry 0 795 16-07-25, 10:45 PM
آخر رد: mmaalmesry
  مساعدة في كيفية ترحيل البيانات من داتا قريدفيو إلى داتا قريدفيو في فيجوال بيسك ahmedfa71 13 2,213 09-07-25, 11:24 PM
آخر رد: أبو خالد الشكري
  مشكلة في حفظ البيانات مصمم هاوي 2 1,019 30-06-25, 08:51 AM
آخر رد: مصمم هاوي
  بطء في جلب البيانات مصمم هاوي 9 993 08-05-25, 07:51 AM
آخر رد: مصمم هاوي
  [Acces2007] مشكلة ملف قاعدة بيانات access للقراءة فقط mmaalmesry 11 1,451 29-04-25, 08:55 PM
آخر رد: mmaalmesry
  تعديل كود تحديث البيانات مصمم هاوي 1 781 26-04-25, 06:07 PM
آخر رد: مصمم هاوي
Photo لايمكن تعرف على تنسيق قاعدة البيانات الدريساوي 2 696 26-04-25, 12:24 AM
آخر رد: الدريساوي
  مساعدة في طريقة تحميل الفيديوهات المخزنة في قاعدة البيانات foad8920 0 659 24-04-25, 12:58 PM
آخر رد: foad8920
  إغلاق الفورم مع حذف جميع البيانات الموجودة به صالح عبدالله 10 1,031 19-04-25, 08:54 PM
آخر رد: Kamil

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


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