C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Windows »

How to add my database to my Setup


Posted Date: 04 Nov 2009      Posted By: Dhanya       Member Level: Silver     Points: 1   Responses: 4



How can I add my sqlserver database to my project so that I can add & view data by executing the project.Thanks in advance.
Dhanya





Responses

Author: Shunmuganathan M    04 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

You can create App.config..
You can keep the common values there...

By Nathan
Direction is important than speed
I am following the following Health Tips
http://dotnetspider.com/sites/1048/-Health-Tips-for-Healthy-Wealthy-IT.aspx



Author: Lalji    04 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

try this link

http://social.msdn.microsoft.com/Forums/en/sqlnetfx/thread/6b3588e0-f02b-4a5b-b780-63acb36aa548

http://msdn.microsoft.com/en-us/library/aa983322.aspx



Author: Selvam    14 Nov 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

first off all add namespace

using System.Data.SqlClient;

den go to menu bar click the option called Data->Add New DataSource-Create new Connection ->select



Author: Selvam    14 Nov 2009Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

first off all add namespace

using System.Data.SqlClient;

den go to menu bar click the option called Data->Add New DataSource-Create new Connection ->select msSQL provider for client -> and test the connection..

den open the Data in menu bar n Add New Data source-> Below u can find a connection String +, expand tat and copy the connection String.
it ill b useful in future.Create one dataGridview to display the output from database...
Codings:

SqlConnection con = new SqlConnection(the copied connection string);

SqlDataAdapter sd = new SqlDataAdapter("select StaffID from StaffAppointment ",conn);
DataSet ds = new DataSet();
sd.Fill(ds);
dataGriview1.dataSource=ds;



Post Reply
You must Sign In to post a response.
Next : How to add image in tooltip [windows forms]
Previous : Email Validation
Return to Discussion Forum
Post New Message
Category: Windows

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use