1
Microsoft SQL Server Express edition provides you a simple solution to create and manage your database for free of cost, it supports SQL Server 2005 programming model so it supports Transact-SQL, stored procedures, views, triggers, SQL Server CLR Integration (SQLCLR), and the XML data type.
Creating an SQL Server Express database:
You can create SQL Server database in two ways:
1.Using Visual Web Developer
In Visual Web Developer, open Solution Explorer, right-click the App_Data folder of your Web application, and then click Add New Item.
or
If your application does not have an App_Data folder, right-click the root folder of your Web application, click Add ASP.NET Folder, and then click App_Data.
Click SQL Database, type a name for the .mdf database file, and then click Add.
Two files are created: DataBaseName.mdf and DataBaseName_log.ldf.
2.Using tools provided by SQL Server Express edition
You can also create SQL server database by using CREATE DATABASE command or other tools provided by SQL Server Express Edition management studion
Connecting SQL Server Express Edition Database with ASP.net application:
You can connect to SQL Server Express database just like you connect to any SQL server Database by specifying database server as the local sql server express edition database.
or
you can also specify an attached Database file in App_Data folder.
Connection Strings
1.Specifying database server as the local SQL Server Express Edition database:
Data Source=.\SQLEXPRESS;Initial Catalog=MyDataBaseName;Integrated Security=True;
2.Specifying an attached database file in App_Data folder:
Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=DataDirectory I MyDataBaseName.mdf;
Creating an SQL Server Express database:
You can create SQL Server database in two ways:
1.Using Visual Web Developer
In Visual Web Developer, open Solution Explorer, right-click the App_Data folder of your Web application, and then click Add New Item.
or
If your application does not have an App_Data folder, right-click the root folder of your Web application, click Add ASP.NET Folder, and then click App_Data.
Click SQL Database, type a name for the .mdf database file, and then click Add.
Two files are created: DataBaseName.mdf and DataBaseName_log.ldf.
2.Using tools provided by SQL Server Express edition
You can also create SQL server database by using CREATE DATABASE command or other tools provided by SQL Server Express Edition management studion
Connecting SQL Server Express Edition Database with ASP.net application:
You can connect to SQL Server Express database just like you connect to any SQL server Database by specifying database server as the local sql server express edition database.
or
you can also specify an attached Database file in App_Data folder.
Connection Strings
1.Specifying database server as the local SQL Server Express Edition database:
Data Source=.\SQLEXPRESS;Initial Catalog=MyDataBaseName;Integrated Security=True;
2.Specifying an attached database file in App_Data folder:
Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=DataDirectory I MyDataBaseName.mdf;
Hi,
I am Richa from SiliconIndia, I trust my email finds you in good health and high spirits. I am also an avid blogger and thought it’s a good time to initiate an interaction by updating you on some of the recent happenings at SiliconIndia.
• We are now a strong community of 1 Million professionals
• There are 10,000 active bloggers who participate in active blogging
We have leaders like Narayan Murthy, Azim Premji to fresh graduates who share their opinion & thoughts to contribute their knowledge and advice through blogging.
We would love to see you, embark on blogging here and sharing your perspectives to the rapidly growing SiliconIndia community and appreciate your community initiative here.
Please mail me back at richa@siliconindia.com with your suggestions and feedback.
Richa Sharma
Blog Editor – SiliconIndia
Post a Comment