Test the Database Connection String in Visual Studio

Verified

Added on  2023/04/23

|16
|405
|479
AI Summary

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Option 1: Check if the database connection string is created
1) Start your program on visual studio and check on the server explorer if “.\
sqlexpress.college.dbo” connection is created as below.
2) If the “.\sqlexpress.college.dbo” is not created create it as follows
i. Select the server explorer.
ii. Right click and add new connection.

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
iii. Select server name as “.\SQLEXPRESS” and select or enter the database name to
connect as “college” as below.
Document Page
iv. Test the connection by clicking the “Test connection” button.
Now connection is successful as above, click ok and ok button.
v. Now run the program and see if it will run successfully.
Document Page
Option 2: ALLOW SERVER REMOTE CONNECTION
1) Open Sql Server Configuration Manager --> SQL Server Network configuration --> Protocols for
<(INSTANCE)> --> TCP/IP (double click on it).

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
2) Select --> IP Addresses(Tab).
Document Page
3) Go to the last entry IP All and mention TCP Port 1433 click apply and ok.
Document Page
4) Open Sql Server Configuration Manager --> SQL Server Network configuration --
>SQL server services--> sql server (SQLEXPRESS)-->Right click --> Restart.
5) Press (Win KEY+R) and enter services.msc go to start -> enter Run-> Click RUN->and
enter services.msc then ok.

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
6) Select the standard tab and select SQL SERVER(SQLEXPRESS).
Document Page
7) Right click on the SQL server(SQLEXPRESS)->properties->start type-> select to be
automatic
Document Page
8) Click apply then ok

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
9) Now the SQL server (SQLEXPRESS) will be running automatically.
Document Page
Option 3 : SET AND ENABLE THE TCP/IP CONNECTION
i. Open "SQL Server Configuration Manager"
ii. Now Click on "SQL Server Network Configuration" and Click on "Protocols for Name"
iii. Right Click on "TCP/IP" (make sure it is Enabled) Click on Properties
Document Page

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
iv. Now Select "IP Addresses" Tab -and- Go to the last entry "IP All"
v. Enter "TCP Port" 1433 and click ok.
Document Page
vi. Now Restart "SQL Server
Document Page
1 out of 16
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]