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

.NET (Core and Framework)

 
GeneralRe: how to restore mysql dump file to database using C# Pin
sr15915-Jul-10 21:33
sr15915-Jul-10 21:33 
AnswerRe: how to restore mysql dump file to database using C# Pin
Peace ON15-Jul-10 22:08
Peace ON15-Jul-10 22:08 
QuestionRe: how to restore mysql dump file to database using C# Pin
sr15915-Jul-10 23:08
sr15915-Jul-10 23:08 
AnswerRe: how to restore mysql dump file to database using C# Pin
sr15916-Jul-10 0:47
sr15916-Jul-10 0:47 
QuestionRe: how to restore mysql dump file to database using C# Pin
sr15916-Jul-10 0:49
sr15916-Jul-10 0:49 
Answer[Here is final resolution] Re: how to restore mysql dump file to database using C# Pin
Peace ON16-Jul-10 1:20
Peace ON16-Jul-10 1:20 
GeneralRe: [Here is final resolution] Re: how to restore mysql dump file to database using C# Pin
sr15916-Jul-10 1:53
sr15916-Jul-10 1:53 
QuestionRe: [Here is final resolution] Re: how to restore mysql dump file to database using C# Pin
sr15916-Jul-10 1:54
sr15916-Jul-10 1:54 
i changed as per instruction but again it is running but not saving to database and also not asking password and also we are not using wamp, we are using mysql 5.0. Please help.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;

namespace dump
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
try
{
restore_data("temple1");


}
catch (Exception ex)
{

Application.Exit();


}


}
public void restore_data(string database)
{

StreamReader file = new StreamReader("E:\\BackupMysql1\\temple.sql");



string cmd = string.Format(@"C:\Program Files\MySQL\MySQL Server 5.0\bin\cmd.exe -u{0} -p -h{1} (2) < {3} ", "root", "localhost", '"' + database + '"', "E:\\BackupMysql1\\temple.sql");
ProcessStartInfo proc = new ProcessStartInfo("cmd", @"/C " + cmd);
//proc.RedirectStandardInput = true;

//proc.RedirectStandardOutput = false;

proc.Arguments = cmd;

proc.UseShellExecute = false;

//Process p = Process.Start(proc);

string res;

//res = file.ReadToEnd();

//p.WaitForExit();

//file.Close();
Process p = new Process();
p.StartInfo = proc;
p.Start();
res = file.ReadToEnd();
p.WaitForExit();
}

}
}
AnswerRe: [Here is final resolution] Re: how to restore mysql dump file to database using C# Pin
Peace ON16-Jul-10 2:13
Peace ON16-Jul-10 2:13 
QuestionRe: it is executing but not saving dump file to database using C# Pin
sr15920-Jul-10 0:19
sr15920-Jul-10 0:19 
AnswerRe: it is executing but not saving dump file to database using C# Pin
sr15920-Jul-10 0:41
sr15920-Jul-10 0:41 
Generalproblem solved now it is working thank you for all who replied to me Pin
sr15921-Jul-10 22:34
sr15921-Jul-10 22:34 
Questionconvert long pathname to short pathname Pin
vijiajai14-Jul-10 19:30
vijiajai14-Jul-10 19:30 
AnswerRe: convert long pathname to short pathname PinPopular
Peace ON14-Jul-10 19:35
Peace ON14-Jul-10 19:35 
GeneralRe: convert long pathname to short pathname Pin
Eddy Vluggen15-Jul-10 11:25
professionalEddy Vluggen15-Jul-10 11:25 
GeneralRe: convert long pathname to short pathname Pin
vijiajai18-Jul-10 18:59
vijiajai18-Jul-10 18:59 
GeneralRe: convert long pathname to short pathname Pin
Eddy Vluggen19-Jul-10 0:03
professionalEddy Vluggen19-Jul-10 0:03 
QuestionError in executing release version, c++ dotnet forms application. Pin
chandu00413-Jul-10 19:03
chandu00413-Jul-10 19:03 
AnswerRe: Error in executing release version, c++ dotnet forms application. Pin
Richard MacCutchan13-Jul-10 21:54
mveRichard MacCutchan13-Jul-10 21:54 
AnswerRe: Error in executing release version, c++ dotnet forms application. Pin
Luc Pattyn13-Jul-10 21:54
sitebuilderLuc Pattyn13-Jul-10 21:54 
AnswerProgress Bar Pin
bisharbn13-Jul-10 8:20
bisharbn13-Jul-10 8:20 
GeneralRe: Progress Bar Pin
Pete O'Hanlon13-Jul-10 8:57
mvePete O'Hanlon13-Jul-10 8:57 
JokeRe: Progress Bar Pin
T M Gray13-Jul-10 10:13
T M Gray13-Jul-10 10:13 
GeneralRe: Progress Bar Pin
Abhinav S13-Jul-10 18:56
Abhinav S13-Jul-10 18:56 
QuestionDll which complied in vista takes too much time Pin
rsumanan13-Jul-10 1:08
rsumanan13-Jul-10 1:08 

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.