Learn ASP.NET Core, Angular, and ASP.NET Core Design Patterns. Instructor-led online courses. Read more...
Instructor-led Online Courses by Bipin Joshi : ASP.NET Core | Angular | Design Patterns
Registration open for October 2018 batches. Read more here.

<%@ Page %>

Developing SQL Server Database Explorer

Introduction

This code sample is an application that can be used to browse various databases, tables and fields of a SQL server. It is a windows forms application that uses ADO.NET to communicate with SQL server. The main screen is an explorer style form that allows you to navigate between various databases.

The application tells you...

  • How to use ADO.NET command object to fire a stored procedure
  • How to obtain a list of database and tables in SQL server
  • How to use DataAdapter to get schema information
  • How to use DataReader
  • How to change databases at run time
  • How to get information like name, nullable, unique, autoincrement etc. about table columns
  • How to use windows TreeView and ListView along with Splitter control

How the application works

  • Initially the connection string is set to master database
  • In the page load event the treeview is filled with available databases from the given SQL server
  • When user clicks on any of these databases, all the user tables and views ate added to the database node
  • When user selects any of the table, all of its fields and information like column name,nullable, unique, autoincrement etc. is displayed in the list view.

How to run the application

  • Create an empty windows forms application in C# using VS.NET
  • Unzip the files in the project folder
  • Add the files to your project
  • Recompile and run the project

Screen Shot


Bipin Joshi is a software consultant, trainer, author and spiritual yoga mentor having 23+ years of experience in software development. He teaches private online courses in ASP.NET Core and Angular to individuals and small groups. He is a published author and has authored or co-authored books for Apress and Wrox press. Having embraced the Yoga way of life he also teaches Ajapa Yoga to interested individuals. To know more about him click here.

He will be teaching ASP.NET Core 2.1 and Angular 6.1 in October 2018. Click here for his online course schedule and more details.

Get connected : Twitter  Facebook  Google+  LinkedIn

Posted On : 22 March 2002


Tags : ADO.NET Data Access SQL Server