Click here to Skip to main content
15,897,519 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
actually i want to make a stand alone application i make a database in ms sql express 2008 r2,then how can i attach database file in my windows application please help me i am bignner
Posted
Comments
virusstorm 6-May-15 10:49am    
Can you clarify what you are trying to accomplish? The way I read this, it sounds like you are going to create a database using SQL Server Management Studio. You then want to take that database and package it with your application. Is that correct?
satyanand mishra 7-May-15 8:03am    
yes but how can i do
virusstorm 7-May-15 8:54am    
This is no simple task and it is still a broad question. Can you provide more details of what you are doing? What are your requirements? How will be packaging and distributing the project? Do you need to create the database file or can you simply using scripts to create the database upon install?
satyanand mishra 8-May-15 8:36am    
I am just simply create a database in ms sql server 2008 r2 like employee. after then i am create windows application in visual studio 2010 .after then i want to make exe of my application .problem is how can i attached this database file

1 solution

Go to Data tab in the menu -> Add Data Source-> it Will ask For Which database You Want to choose -> click next -> Select Dataset -> it will ask for Connection String -> Click on new connection->On Clicking A wizard will Open ->Choose datasource as SQl Server -> then choose server name Type . if its on you local machine -> choose authetication type ->Then at the bottom see the database name shows up select from that .click next-> it will prompt You to Which table to choose -> Choose the table-> click on finish ->



if you want to see your table open the server explorer from by clicking on view from menu bar -> server explorer ->



let me know if it helped
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900