make sure you have the correct database connection string defined, also please specify the technology you are using Ado.Net or EntityFramework.
for Ado.Net:-
In visual studio menu option, Go to view-->Server explorer--> Add new connection-->specify the server name and connect. then on Your database-->Right click--->Properties--->Connection string--->Copy the connection string.
and use the same while preparing the SqlConnection object.
I am working on MVC project and I want connect database. I have create class view and model but there is an some mistake where I am unable to connect. Please help
Sachin SinghPosted Jul 16, 2021, 2:03 PM
make sure you have the correct database connection string defined, also please specify the technology you are using Ado.Net or EntityFramework.
for Ado.Net:-
In visual studio menu option, Go to view-->Server explorer--> Add new connection-->specify the server name and connect. then on Your database-->Right click--->Properties--->Connection string--->Copy the connection string.
and use the same while preparing the SqlConnection object.
Gangadhar JagtapPosted Jul 16, 2021, 12:51 PM
Madan ShekarPosted Jul 16, 2021, 10:11 AM
Gangadhar JagtapPosted Jul 16, 2021, 9:05 AM
Madan ShekarPosted Jul 16, 2021, 6:29 AM