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 :
when I changed the dataBase name adventureWorks to ClinicDB and execute it, I got no answer ...Code:BACKUP DATABASE AdventureWorks TO DISK = 'Z:\SQLServerBackups\AdvWorksData.bak' WITH FORMAT; GO
this is the SQL Server management studio Error :
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 ...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.
thanks if someone help ...




Reply With Quote