Click here to Skip to main content
15,893,790 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello friends...

I m assigned a task to develop an application for creating, altering and dropping databases, tables, stored procedures, functions and creating database backup and so on. at runtime. for I googled for it but failed to get information about it. I m using C# 4.0 to develop the application. Please help me.
Posted
Comments
Sascha Lefèvre 3-Apr-15 6:07am    
If you couldn't find information on that by googling, you didn't google thoroughly.

We do not do your homework. It would defeat the main reason it has been assigned to you.

You have to concentrate on two things to have this task achieved:
- the SQL data definition queries
- the way to execute some SQL queries from C#

And mix both of them, finally.
 
Share this answer
 
Comments
Sascha Lefèvre 3-Apr-15 6:05am    
Doesn't really look like homework to me. However, it's not a good question anyway..
I needed a light-weight version of this for my Tests. I'm Just executing sqlcmd and use prepared sql-scripts. You could base your tool arround the same idea

C#
ProcessStartInfo psiSqlCmd = new ProcessStartInfo("sqlcmd", String.Format("-S {0} -i {1}", strServer, strScriptPath));
 
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