Click here to Skip to main content
15,894,955 members
Home / Discussions / Database
   

Database

 
GeneralBetter way of iteration Pin
sreejith ss nair21-Dec-04 2:39
sreejith ss nair21-Dec-04 2:39 
GeneralRe: Better way of iteration Pin
ScottSingleton21-Dec-04 7:59
ScottSingleton21-Dec-04 7:59 
GeneralRe: Better way of iteration Pin
sreejith ss nair21-Dec-04 16:45
sreejith ss nair21-Dec-04 16:45 
GeneralRe: Better way of iteration Pin
Jon Hulatt21-Dec-04 22:39
Jon Hulatt21-Dec-04 22:39 
GeneralRe: Better way of iteration Pin
sreejith ss nair21-Dec-04 23:15
sreejith ss nair21-Dec-04 23:15 
GeneralRe: Better way of iteration Pin
Jon Hulatt21-Dec-04 23:24
Jon Hulatt21-Dec-04 23:24 
GeneralSQL SERVER HELP Pin
| Muhammad Waqas Butt |20-Dec-04 11:12
professional| Muhammad Waqas Butt |20-Dec-04 11:12 
GeneralRe: SQL SERVER HELP Pin
Colin Angus Mackay20-Dec-04 11:30
Colin Angus Mackay20-Dec-04 11:30 
WaqasButt wrote:
HOw we can take sql server db backup in c#.net?

The same way as any other database access using C#, by using the SqlConnection and SqlCommand objects.

You can write some C# that makes a connection to the database (so long as the user making the connection has the sysadmin, db_owner or db_backupoperator role) then you can issue the BACKUP DATABASE command with the SqlCommand.ExecuteNonQuery()

For details on the BACKUP command you may with to read the SQL Server Documentation[^]

So, your C# code will look something like this:
SqlConnection conn = new SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand("BACKUP DATABASE...", conn);
cmd.ExecuteNonQuery();


Does this help?


Do you want to know more?
WDevs.com - Member's Software Directories, Blogs, FTP, Mail and Forums


GeneralRestore a database Pin
bigtone7820-Dec-04 9:32
bigtone7820-Dec-04 9:32 
GeneralRe: Restore a database Pin
Dallas Matthews20-Dec-04 10:01
Dallas Matthews20-Dec-04 10:01 
GeneralRe: Restore a database Pin
bigtone7820-Dec-04 10:09
bigtone7820-Dec-04 10:09 
GeneralRe: Restore a database Pin
Rob Graham24-Dec-04 6:00
Rob Graham24-Dec-04 6:00 
Generalsql transaction Pin
sianatia20-Dec-04 8:20
sianatia20-Dec-04 8:20 
GeneralRe: sql transaction Pin
Colin Angus Mackay20-Dec-04 8:35
Colin Angus Mackay20-Dec-04 8:35 
GeneralSingle connection in several forms Pin
hammerj18-Dec-04 23:58
susshammerj18-Dec-04 23:58 
GeneralRe: Single connection in several forms Pin
Colin Angus Mackay19-Dec-04 2:13
Colin Angus Mackay19-Dec-04 2:13 
GeneralRe: Single connection in several forms Pin
j1hammer19-Dec-04 2:34
j1hammer19-Dec-04 2:34 
GeneralRe: Single connection in several forms Pin
Colin Angus Mackay19-Dec-04 2:38
Colin Angus Mackay19-Dec-04 2:38 
GeneralRe: Single connection in several forms Pin
j1hammer19-Dec-04 23:34
j1hammer19-Dec-04 23:34 
GeneralLogin Failed : user ASPNET (MSDE) Pin
asif m@hmood18-Dec-04 7:28
asif m@hmood18-Dec-04 7:28 
GeneralRe: Login Failed : user ASPNET (MSDE) Pin
Mike Dimmick18-Dec-04 8:38
Mike Dimmick18-Dec-04 8:38 
GeneralLibraries Pin
abo el ror18-Dec-04 3:32
abo el ror18-Dec-04 3:32 
GeneralMSDE US Date format problem Pin
hugonz17-Dec-04 23:40
hugonz17-Dec-04 23:40 
GeneralRe: MSDE US Date format problem Pin
Mike Dimmick18-Dec-04 9:04
Mike Dimmick18-Dec-04 9:04 
GeneralRe: MSDE US Date format problem Pin
hugonz18-Dec-04 11:19
hugonz18-Dec-04 11:19 

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

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