Click here to Skip to main content
15,903,388 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Customizable menu Pin
Luc Pattyn9-Aug-10 1:31
sitebuilderLuc Pattyn9-Aug-10 1:31 
AnswerRe: Customizable menu Pin
JF201511-Aug-10 18:59
JF201511-Aug-10 18:59 
QuestionRead/Write image metadata in VB2008 [modified] Pin
Archdeacon6-Aug-10 23:11
Archdeacon6-Aug-10 23:11 
Generalasp.net updatepanel with dropdownlists-can not select a different item Pin
Martin_6-Aug-10 8:09
Martin_6-Aug-10 8:09 
GeneralRe: asp.net updatepanel with dropdownlists-can not select a different item Pin
Not Active6-Aug-10 8:48
mentorNot Active6-Aug-10 8:48 
GeneralRe: asp.net updatepanel with dropdownlists-can not select a different item Pin
T M Gray9-Aug-10 6:02
T M Gray9-Aug-10 6:02 
QuestionMessage Removed Pin
5-Aug-10 23:51
sr1595-Aug-10 23:51 
AnswerRe: i created mysqldump application using C#. it is saving to some path which i given. but how to make that application to save dump automatically at every 3 or 4 hours once daily [modified] Pin
Pete O'Hanlon6-Aug-10 0:26
mvePete O'Hanlon6-Aug-10 0:26 
<quote>*Contents of removed message*
i created mysqldump application using C#. it is saving to some path which i given. but how to make that application to save automatically like every 3 or 4 hours daily. i written code like below
public void Dump()
{
try
{
DateTime Time = DateTime.Now;
int year = Time.Year;
int month = Time.Month;
int day = Time.Day;
int hour = Time.Hour;
int minute = Time.Minute;
int second = Time.Second;
int millisecond = Time.Millisecond;

string path;
path = "E:\\BackupMysql1\\" + year + "-" + month + "-" + day + "-" + hour + "-" + minute + "-" + second + "-" + millisecond + "_temple.sql";
StreamWriter file = new StreamWriter(path);
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = @"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqldump";
psi.RedirectStandardInput = false;
psi.RedirectStandardOutput = true;
psi.Arguments = string.Format(@"-u{0} -p{1} -h{2} {3}", "xyz", "abcd", "localhost", "database");
psi.UseShellExecute = false;
Process process = Process.Start(psi);
string output;
output = process.StandardOutput.ReadToEnd();
file.WriteLine(output);
process.WaitForExit();
file.Close();
process.Close();
}
catch (IOException ex)
{
MessageBox.Show("Error , unable to backup!");
}
}
anybody knows please reply me.
*End*
The easy way to do this is to use a scheduled job in the windows scheduler that is set to run at a set interval. Don't muck about attempting to write code to do this when the OS provides a perfectly serviceable method.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



modified on Friday, August 13, 2010 12:24 PM

QuestionExpan/Collapse Table Pin
All Time Programming5-Aug-10 23:12
All Time Programming5-Aug-10 23:12 
AnswerRe: Expan/Collapse Table Pin
Prosanta Kundu online5-Aug-10 23:24
Prosanta Kundu online5-Aug-10 23:24 
GeneralRe: Expan/Collapse Table Pin
All Time Programming6-Aug-10 0:02
All Time Programming6-Aug-10 0:02 
GeneralRe: Expan/Collapse Table Pin
Not Active6-Aug-10 8:55
mentorNot Active6-Aug-10 8:55 
AnswerRe: Expan/Collapse Table Pin
All Time Programming6-Aug-10 19:47
All Time Programming6-Aug-10 19:47 
QuestionCompare column names in Excel in each sheet by SSIS Pin
Member 32222645-Aug-10 3:35
Member 32222645-Aug-10 3:35 
AnswerRe: Compare column names in Excel in each sheet by SSIS Pin
Not Active5-Aug-10 6:27
mentorNot Active5-Aug-10 6:27 
QuestionSSIS package VS 2005,porting data from Excel to DB Pin
Member 32222645-Aug-10 2:41
Member 32222645-Aug-10 2:41 
QuestionMessage Removed Pin
4-Aug-10 19:59
Member 32222644-Aug-10 19:59 
AnswerRe: SSIS PACKAGE VS 2005 - IMPORT EXCEL TO DATABASE. Pin
Richard MacCutchan5-Aug-10 2:32
mveRichard MacCutchan5-Aug-10 2:32 
QuestionSSIS Package VS2010 Pin
Member 32222644-Aug-10 19:54
Member 32222644-Aug-10 19:54 
AnswerRe: SSIS Package VS2010 Pin
gablock5-Aug-10 2:58
gablock5-Aug-10 2:58 
QuestionTeam Foundation Server vs Visual Source Safe Pin
CARisk34-Aug-10 8:29
CARisk34-Aug-10 8:29 
AnswerRe: Team Foundation Server vs Visual Source Safe Pin
Not Active4-Aug-10 8:39
mentorNot Active4-Aug-10 8:39 
GeneralRe: Team Foundation Server vs Visual Source Safe Pin
CARisk34-Aug-10 8:44
CARisk34-Aug-10 8:44 
GeneralRe: Team Foundation Server vs Visual Source Safe Pin
Not Active4-Aug-10 8:52
mentorNot Active4-Aug-10 8:52 
GeneralRe: Team Foundation Server vs Visual Source Safe Pin
CARisk34-Aug-10 8:57
CARisk34-Aug-10 8:57 

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.