How do I view data from a database in Visual Studio?
To connect to a database instance
In Visual Studio, make sure that SQL Server Object Explorer is open. If it is not, click the View menu and select SQL Server Object Explorer.
How to display data from database in C#?
You can use this : SqlConnection Conn = new SqlConnection(Connection_String); SqlCommand Comm1 = new SqlCommand(Command, Conn); Conn. Open(); SqlDataReader DR1 = Comm1. ExecuteReader(); if (DR1.