Click here to Skip to main content
15,895,462 members
Home / Discussions / C#
   

C#

 
GeneralRe: LRC calculation... What did I miss? Pin
Kiotaya9-Nov-09 5:44
Kiotaya9-Nov-09 5:44 
GeneralRe: LRC calculation... What did I miss? Pin
Kiotaya7-Jan-10 14:14
Kiotaya7-Jan-10 14:14 
GeneralRe: LRC calculation...Solution pls... Pin
Member 77181421-Mar-11 21:24
Member 77181421-Mar-11 21:24 
QuestionRe: LRC calculation...Solution pls... Pin
Michael Sogos 202128-Jun-21 13:37
Michael Sogos 202128-Jun-21 13:37 
QuestionWIA and Windows 7 PinPopular
toby317-Nov-09 18:36
toby317-Nov-09 18:36 
AnswerRe: WIA and Windows 7 Pin
oeatek8-Dec-09 4:43
oeatek8-Dec-09 4:43 
GeneralRe: WIA and Windows 7 Pin
toby318-Dec-09 10:15
toby318-Dec-09 10:15 
QuestionHOw to create MySql database backup programmatically in C#.net Pin
gopal_bnvs7-Nov-09 18:22
gopal_bnvs7-Nov-09 18:22 
Hi

I have the code to make the backup of the MySql database like this..

try
{
DateTime backupTime = DateTime.Now;
int year = backupTime.Year;
int month = backupTime.Month;
int day = backupTime.Day;
int hour = backupTime.Hour;
int minute = backupTime.Minute;
int second = backupTime.Second;
int ms = backupTime.Millisecond;

String tmestr = backupTime.ToString();
tmestr = "C:\\" + year + "-" + month + "-" + day + "-" + hour + "-" + minute + ".sql";
StreamWriter file = new StreamWriter(tmestr);
ProcessStartInfo proc = new ProcessStartInfo();
string cmd = string.Format(@"-u{0} -p{1} -h{2} {3} > {4};", "root", "password", "localhost", "dbfile", "backup.sql");
proc.FileName = "mysqldump";
proc.RedirectStandardInput = false;
proc.RedirectStandardOutput = true;
proc.Arguments = cmd;//"-u root -p smartdb > testdb.sql";
proc.UseShellExecute = false;
Process p = Process.Start(proc);
string res;
res = p.StandardOutput.ReadToEnd();
file.WriteLine(res);
p.WaitForExit();
file.Close();

}

catch (IOException ex)
{
MessageBox.Show("Disk full or other IO error , unable to backup!");
}
}


while executing the program it is showing an error as shown

"The system cannot find the file specified" with caption "Win32Exception was unhandled "...

can anyone help todo this.....
Answerbump attempt Pin
Luc Pattyn8-Nov-09 1:19
sitebuilderLuc Pattyn8-Nov-09 1:19 
Questionconnectionstring Pin
farokhian7-Nov-09 18:13
farokhian7-Nov-09 18:13 
AnswerRe: connectionstring Pin
Alegria_Lee7-Nov-09 18:57
Alegria_Lee7-Nov-09 18:57 
QuestionHow to retrieve a MPG picture from DB or convert byte[] to MPG? [modified] Pin
Alegria_Lee7-Nov-09 17:05
Alegria_Lee7-Nov-09 17:05 
AnswerRe: How to retrieve a MPG picture from DB or convert byte[] to MPG? Pin
Jacob Dixon8-Nov-09 5:41
Jacob Dixon8-Nov-09 5:41 
GeneralRe: How to retrieve a MPG picture from DB or convert byte[] to MPG? Pin
Alegria_Lee9-Nov-09 3:29
Alegria_Lee9-Nov-09 3:29 
QuestionConditional X and Y position of a Crystal Reports field Pin
sharad Pyakurel7-Nov-09 16:59
sharad Pyakurel7-Nov-09 16:59 
QuestionSimple BHO problem Pin
fasfasdf7-Nov-09 14:42
fasfasdf7-Nov-09 14:42 
QuestionAccessing cameras without frameworks... Pin
Jacob Dixon7-Nov-09 14:27
Jacob Dixon7-Nov-09 14:27 
AnswerRe: Accessing cameras without frameworks... Pin
Christian Graus7-Nov-09 14:35
protectorChristian Graus7-Nov-09 14:35 
GeneralRe: Accessing cameras without frameworks... Pin
Jacob Dixon7-Nov-09 14:38
Jacob Dixon7-Nov-09 14:38 
GeneralRe: Accessing cameras without frameworks... Pin
Christian Graus7-Nov-09 14:43
protectorChristian Graus7-Nov-09 14:43 
GeneralRe: Accessing cameras without frameworks... Pin
Jacob Dixon7-Nov-09 14:50
Jacob Dixon7-Nov-09 14:50 
GeneralRe: Accessing cameras without frameworks... Pin
Christian Graus7-Nov-09 14:52
protectorChristian Graus7-Nov-09 14:52 
GeneralRe: Accessing cameras without frameworks... Pin
Jacob Dixon7-Nov-09 14:55
Jacob Dixon7-Nov-09 14:55 
GeneralRe: Accessing cameras without frameworks... Pin
Christian Graus7-Nov-09 14:57
protectorChristian Graus7-Nov-09 14:57 
GeneralRe: Accessing cameras without frameworks... Pin
Jacob Dixon7-Nov-09 15:00
Jacob Dixon7-Nov-09 15:00 

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.