I want to save my backup file in specific folder. currently I'm using a saveFileDialog
box to give path
and file name on a button click
. But I want to create this backup by giving name as (DateTime.Today.Date.ToShortDateString())
and save this in "D:\Database"
directly on button
click. and don't want to use saveFileDialog
box. I'm using this code:
SqlCommand cmd = new SqlCommand("USE MASTER BACKUP DATABASE plproject TO DISK = '" + saveFileDialog1.FileName + "'", connectionsql);