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

.NET (Core and Framework)

 
GeneralRe: [Repost] Re: how to restore mysql dump file to database using C#, ASP.net Pin
Peace ON16-Jul-10 2:09
Peace ON16-Jul-10 2:09 
Questionhow to restore mysql dump file to database using C# , ASP.NET Pin
sr15915-Jul-10 20:56
sr15915-Jul-10 20:56 
AnswerRe: how to restore mysql dump file to database using C# Pin
Peace ON15-Jul-10 21:19
Peace ON15-Jul-10 21:19 
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 
some changes made like form load and creating function and it is executing and also that is taking values from dump file but again not saving to database. please reply me

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");


ProcessStartInfo proc = new ProcessStartInfo(@"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe");


string cmd = string.Format(@"-u{0} -p{1} -h{2} {3} <{4}", "dfs", "sf#", "localhost", '"' + temple1 + '"', "E:\\BackupMysql1\\temple.sql");
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();

}

}
}
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 
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 

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.