how to create database in mssql server

  • Thread starter Thread starter Nanda
  • Start date Start date
N

Nanda

hi,
how to create database in mssql server using c#. We can
create msacess database using adox, similiarly how to
create sql server database using c#.

Regards,
Nanda.
 
How about create all your SQL statement in setupdb.sql and then as from your
code just pass the file to sqlserver. I used it from Msdos prompt sometime.

I think he might want to provide a function like setup new database for his
application :D
 
hi,
thanks for your reply. I need to create database in sql
server at runtime. So i like to create the database using
c#.
 
hi,
thanks for your reply. I need to create database in sql
server at runtime. So i like to create the database using
c#.

You are creating a SQL Server mgmt app in C#??? :|
 
hi all,
thanks for your inputs. I dont create SQL Server mgmt
app in C#. I just need to create a database at runtime.
I used ExecuteNonQuery method to create the database.

Regards,
Nanda.
 
Back
Top