How to Create Database Connection Easily?

This post will explain an easy way to get any database connection string. So, you can use this string to connect to your database using any developing Language.

  • Right-Click on your Desktop.
  • Then new Text Document.
  • Change File extension from .txt to .udlfile.
  • UDL file is data link file, can be opened by Microsoft Data Access.
  • Double click on the file after changing the extension.

  • You will see a form similar to the form above.
  • From the provider tab, You can choose the type of database provider you want to use (Access, SQL Server, Oracle …).
  • Connection tab will be different according to the provider you choose before from provider tab.
  • The connection here for SQL Server Provider.
  • The server name is the Database instance Name plus Machine Name.
  • Logging to the database requires password and username that’s only if you use Mixed Mode in Installing SQL Server Database.
  • If you don’t know the user and password user windows Integrated Security.
  • Then if the information above is correct you will get all databases you created in “Select the database on the Server “Tab.
  • Choose the one you want to connect to it.
  • Test your Connection.
  • Close the file by pressing OK button.
  • Open the file with notepad.
  • You will find the Connection String.
  • Copy and paste in your Code.



Let me know your thoughts