Click here to Skip to main content
   

C#

 
GeneralRe: how to confirm Security risk alert in C# web browser PinmemberAbhinaw Kumar Singh25-Feb-14 7:18 
GeneralRe: how to confirm Security risk alert in C# web browser PinprofessionalRichard Deeming25-Feb-14 8:16 
GeneralRe: how to confirm Security risk alert in C# web browser PinprofessionalBernhard Hiller25-Feb-14 22:39 
QuestionCreating DTO using TDD approach Pinmemberramsai197325-Feb-14 2:22 
Questionhow to restore a sql database programmatically in c#? Pinmemberrincy sivan25-Feb-14 0:35 
AnswerRe: how to restore a sql database programmatically in c#? PinprofessionalNicholas Marty25-Feb-14 0:54 
AnswerRe: how to restore a sql database programmatically in c#? PinprotectorOriginalGriff25-Feb-14 0:57 
AnswerRe: how to restore a sql database programmatically in c#? PinmemberRaj Mouli26-Feb-14 20:44 
The following namespaces can be used to access SQL Server 2005 programmatically:
 
Microsoft.SqlServer.management
Microsoft.SqlServer.Management.NotificationServices
Microsoft.SqlServer.Management.Smo
Microsoft.SqlServer.Management.Smo.Agent
Microsoft.SqlServer.Management.Smo.Broker
Microsoft.SqlServer.Management.Smo.Mail
Microsoft.SqlServer.Management.Smo.RegisteredServers
Microsoft.SqlServer.Management.Smo.Wmi
Microsoft.SqlServer.Management.Trace
Backup bkpDBFull = new Backup();
/* Specify whether you want to back up database or files or log */
bkpDBFull.Action = BackupActionType.Database;
/* Specify the name of the database to back up */
bkpDBFull.Database = myDatabase.Name;
/* You can take backup on several media type (disk or tape), here I am
 * using File type and storing backup on the file system */
bkpDBFull.Devices.AddDevice(@"D:\AdventureWorksFull.bak", DeviceType.File);
bkpDBFull.BackupSetName = "Adventureworks database Backup";
bkpDBFull.BackupSetDescription = "Adventureworks database - Full Backup";
/* You can specify the expiration date for your backup data
 * after that date backup data would not be relevant */
bkpDBFull.ExpirationDate = DateTime.Today.AddDays(10);
 
/* You can specify Initialize = false (default) to create a new
 * backup set which will be appended as last backup set on the media. You
 * can specify Initialize = true to make the backup as first set on the
 * medium and to overwrite any other existing backup sets if the all the
 * backup sets have expired and specified backup set name matches with
 * the name on the medium */
bkpDBFull.Initialize = false;
 
/* Wiring up events for progress monitoring */
bkpDBFull.PercentComplete += CompletionStatusInPercent;
bkpDBFull.Complete += Backup_Completed;
 
/* SqlBackup method starts to take back up
 * You can also use SqlBackupAsync method to perform the backup
 * operation asynchronously */
bkpDBFull.SqlBackup(myServer);
Mouli

AnswerRe: how to restore a sql database programmatically in c#? PinmemberRaj Mouli26-Feb-14 20:45 
QuestionSerialComm Port to send and receive sms Pinmemberyomag4chi24-Feb-14 22:51 
AnswerRe: SerialComm Port to send and receive sms PinprotectorRichard MacCutchan24-Feb-14 23:04 
AnswerRe: SerialComm Port to send and receive sms PinprotectorOriginalGriff24-Feb-14 23:29 
Questionhow to prevent form open twice PinmemberAman Susanto24-Feb-14 3:50 
AnswerRe: how to prevent form open twice Pinmemberjohannesnestler24-Feb-14 4:15 
GeneralRe: how to prevent form open twice PinprofessionalEddy Vluggen24-Feb-14 7:57 
GeneralRe: how to prevent form open twice Pinmemberjohannesnestler24-Feb-14 9:12 
AnswerRe: how to prevent form open twice [modified] PinmemberBillWoodruff24-Feb-14 7:41 
AnswerRe: how to prevent form open twice PinprofessionalRichard Deeming24-Feb-14 10:00 
GeneralRe: how to prevent form open twice PinmemberBillWoodruff24-Feb-14 14:21 
SuggestionRe: how to prevent form open twice Pinmemberazhar9925-Feb-14 21:50 
QuestionA first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in Microsoft.Phone.Data.Internal.ni.dll PinmemberGene Lim23-Feb-14 23:40 
AnswerRe: A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in Microsoft.Phone.Data.Internal.ni.dll PinmemberNaveen Kumar Krishnan24-Feb-14 2:18 
GeneralRe: A first chance exception of type 'System.Data.SqlServerCe.SqlCeException' occurred in Microsoft.Phone.Data.Internal.ni.dll PinmemberGene Lim24-Feb-14 3:53 
QuestionSQL SELECT Current User c# Pinmembermcgurdan22-Feb-14 10:49 
AnswerRe: SQL SELECT Current User c# PinprofessionalRavi Bhavnani22-Feb-14 12:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.150224.1 | Last Updated 27 Feb 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid