Hi there, I have a database named : "ClinicDB.MDF"
I want to getting backup of this database with C# Code ...
i saw it's SQL Syntax,
here's an example of MSDN Library :

Code:
BACKUP DATABASE AdventureWorks 
 TO DISK = 'Z:\SQLServerBackups\AdvWorksData.bak'
   WITH FORMAT;
GO
when I changed the dataBase name adventureWorks to ClinicDB and execute it, I got no answer ...
this is the SQL Server management studio Error :

Code:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '.'.
Msg 319, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
and finally I want a code that can be run in C# and getting a backup dataBase operation, but I don't know how to code it ...

thanks if someone help ...