Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
if yes then how? the database should be create automatically.
Posted

1 solution

99.9999% of the time, you don;t want to create a database: you would normally only create it once when your app is installed, if the DB does not exist already. Creating a DB each time is tremendously wasteful, and will destroy any existing data. If you want something created fresh on a regular or frequent basic, you are probably better off with a different solution.

However: Create an SQL Server Database Using C#[^] is one example of how to do it, google has many, many more: Google[^]
 
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