Jump to content

How do I access the Database from the Server Explorer in Visual Studio?

Go to solution Solved by flexluthor,

Oh okay nevermind, I just had to create a dataset from the database and drag it onto the form.

I just started Visual Studio and I followed a video that created a local database and connected it to Server Explorer in Visual Studio, the steps I did were:

1. Right click my project, choose Add -> New Item -> Service-based Database

2. Went to the Server Explorer on the left, right clicked on Data Connections, choose Add Connection, selected the database that I created, tested the connection and it passed then pressed Ok

3. Populated my Database with three tables and added ten rows of data

 

Now I don't know exactly how would my form have access to the database I created, I have a small experience with databases as I've studied web development for a month and I remember I made a variable to store the connection to the server, database, username, password then used that variable after every query I made.

Link to comment
Share on other sites

Link to post
Share on other sites

Oh okay nevermind, I just had to create a dataset from the database and drag it onto the form.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×