how to create database in mssql server

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.
 
K

Kun

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
 
N

Nanda

hi,
thanks for your reply. I need to create database in sql
server at runtime. So i like to create the database using
c#.
 
N

NULL

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#??? :|
 
N

Nanda

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top