How to connect database SQL server 2008 with visual studio 2010

SQL server

SQL server very critical function for every online server server provider. In computer software development , The database create and database design  is most important part .Any software must have database , It has to design and connect it with a interfacing IDE (Integrated Development Environment) . Desktop based software development and web based software development must have to connect database . Database connection is the major issue and a problem in computer software programming . In this session we have described about database connection with Visual Studio 2010 in C sharp language .If we can not connect database properly , it must be create problem in the time while we want to create an EXE file for installing the database software in our real application .

 

Here the database name is DUCT.mdf and it saved in drive D and the folder of the database name is db. A Gateway class is  used for handling the connection string . Here also a Gateway constructor  for initialize the class. It is format of object oriented programming and also used for tips and tricks for software development using computer.

 

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

 

namespace DuckDesign.Gateway

{

public class Gateway

{

string connectionString = @”server = .\D:\db\DUCT.mdf; integrated security = SSPI;”;

public string GetConnection()

{

return connectionString;

}

}

}

Share

4 thoughts on “How to connect database SQL server 2008 with visual studio 2010

  • May 10, 2016 at 1:12 am
    Permalink

    Briaillnce for free; your parents must be a sweetheart and a certified genius.

    Reply
  • July 23, 2016 at 11:38 am
    Permalink

    I just want to say I am just newbie to blogs and absolutely liked your web site. Very likely I’m likely to bookmark your website . You surely have incredible writings. With thanks for revealing your web-site.

    Reply
  • November 16, 2016 at 8:33 pm
    Permalink

    Here are some variables which you can contemplate while purchasing Garcinia
    Cambogia extract.

    Reply
  • December 10, 2016 at 7:54 am
    Permalink

    Hello admin !! I read your blog everyday and i must say you have hi quality
    posts here. Your blog deserves to go viral. You
    need initial boost only. How to go viral fast? Search for; forbesden’s
    tools

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *