views:

110

answers:

1

Hi all,

I need to create database from codebehind in ASP.net 2.0.

Please help.

A: 

May be like this:

SqlConnection connection = new SqlConnection(connectionString);
SqlCommand command = new SqlCommand("CREATE DATABASE database_name", connection);
command.Connection.Open();
command.ExecuteReader();
connection.Close();
DreamWalker