Click here to Skip to main content
15,911,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am currently building a project. I use Microsoft Visual Studio 2008 as IDE and MS SQL Server 2005 as Database Backend. I am using C# as Front-end language. Now, I want to add features to my application that will enable a user to backup and restore the database directly from the application on runtime.

How can I do this? Please help me. I am new in C#
Posted

1 solution

 
Share this answer
 
Comments
Uday P.Singh 8-Oct-11 10:01am    
nice link my 5!
Bala Selvanayagam 8-Oct-11 10:22am    
Thanks Uday P.Singh
Jyoti Choudhury 8-Oct-11 12:35pm    
Thanks for your link...Nice ofcourse. But I can not find the Microsoft.SqlServer.Management. Do I need to install any prerequisite anything?
Bala Selvanayagam 8-Oct-11 15:08pm    
Hope you have SQL server installed on your computer and needs to add the reference

1. Add refernce to Microsoft.SqlServer.ConnectionInfo.dll
Right click on your VS2010 project solution ->Add reference and select the dll.

Assuming the default installation folders you can find the Microsoft.SqlServer.ConnectionInfo.dll assembly in:

C:\Program Files\Microsoft SQL Server\XXXX\SDK\Assemblies

after this you can add the using statement for Microsoft.SqlServer.Managemen

Where XXXX represents the version of SQL Server you're running:

80 -> SQL Server 2005
90 -> SQL Server 2008
100 -> SQL Server 2008R2

If you're running SQL Server 32bit on x64 then instead of c:\Program Files use c:\Program Files (x86).

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