Use Of Database Without Installing SQL Server Using Visual Studio

Introduction

This article which will help all the people who need to work with the visual studio application and aren't very dependent on the data part. They have options to have many data sources.

When you require SQL database and do not want to install SQL Server in your machine then here is the solution for consuming the SQL database in your  application where you don't need to install SQL installations.

Here the step by step process is explained with screen shots.

How to create a database file

  1. Step: Open Visual Studio and select view option.

    option

  2. Step: In the View menu open the “Server Explorer”

    Server Explorer is the place where all the database server related information will be available.

    Go to view -> server Explorer or Ctrl+W+L,

    option

  3. Step: Create a DataBase using Add Connection

    The Add Connection is the command used to add the new server connection or any of the database connections to the Data Connections.

    add

  4. Step: In Add Connection, you will be provided the option to select and add any new connection of the database.
    You will have many options like ODBC, SQL ect. Here select the SQL.

    Select Microsoft SQL Server Database File -> ok

    change

    Note:

    Browse to create a DB file[Give a New DataBase Name in the File Name & Open] in Location : Always Recommeneded to create in APP Data folder of the project – using Browse Option

  5. Step: Database is Created and now it's time to create the table to the database, as these database tables are used in your applications.

    Add New Table And Design The Database And Tables As Required

    New Table

    Add Table and create the data as you require for your application and start consuming the database into your application using the connection string fetched from Database ADO.Net Connections.

    Hope this is very simple and very helpful for beginners; this feature can be used from the older visual studio version, here we have shown VS2008.
Read more articles on SQL Server:

Up Next
    Ebook Download
    View all
    Learn
    View all