|
-
September 26th, 2009, 08:58 AM
#1
Taking backup from DataBase (LINQ)?
Hi.
I've added a SQL database to my project. It's beside of the exe file in SQL folder.
I was using SQL to LINQ.
Now I wanna get a backup from it with C#.
I'm using following method :
PHP Code:
public static void GetBackUp() { if (!Directory.Exists(StaticVariables.BackUPFolder)) Directory.CreateDirectory(StaticVariables.BackUPFolder);
using (RezaRestaurant.SQL.DataClasses1DataContext dbc = new RezaRestaurant.SQL.DataClasses1DataContext()) { dbc.ExecuteCommand(@"BACKUP DATABASE " + dbc.Mapping.DatabaseName + " TO DISK='c:\aaa.bak'");//Exception } }
But I've received the below Exception
BackUP Exception.jpg
Could you please guide me, how I can resolve it ?
Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|