Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to Upload large size file to server Pin
musefan30-Jun-09 2:43
musefan30-Jun-09 2:43 
GeneralRe: How to Upload large size file to server Pin
Vimalsoft(Pty) Ltd30-Jun-09 2:47
professionalVimalsoft(Pty) Ltd30-Jun-09 2:47 
GeneralRe: How to Upload large size file to server Pin
musefan30-Jun-09 2:58
musefan30-Jun-09 2:58 
AnswerRe: How to Upload large size file to server Pin
musefan30-Jun-09 2:33
musefan30-Jun-09 2:33 
GeneralRe: How to Upload large size file to server Pin
wasimsharp30-Jun-09 2:42
wasimsharp30-Jun-09 2:42 
AnswerRe: How to Upload large size file to server Pin
musefan30-Jun-09 3:01
musefan30-Jun-09 3:01 
AnswerRe: How to Upload large size file to server Pin
Anthony Mushrow30-Jun-09 3:08
professionalAnthony Mushrow30-Jun-09 3:08 
QuestionMySQL restore database through c# Pin
mariamkhaqan30-Jun-09 2:06
mariamkhaqan30-Jun-09 2:06 
Hi I have used multiple ways to restore mysql schema through c# but it doesnot seems to work as the database doesnot restores properly,
please tell me what to do, my code for restore is as under
string filename = backupName;
                StreamWriter file = new StreamWriter(filename);
                file.WriteLine("@ECHO off");
                file.WriteLine("cls");
                file.WriteLine("set DBchoice=%1%");
                file.WriteLine("set User=%2%");
                file.WriteLine("set Password=%3%");
                file.WriteLine("set pathchoice=%4%");
                file.WriteLine("");
                file.WriteLine("@REM Remove double quotes from the path");
                file.WriteLine("@REM SET pathchoice=%pathchoice:\"=%");
                file.WriteLine("@REM SET pathchoice=%pathchoice:\"=%");
                file.WriteLine("");
                file.WriteLine("mysql -u " + Id + " --password=" + pwd + " " + dbName + "<" + path);

                file.Close(); 


the other one is

StreamReader file = new StreamReader(path);
                ProcessStartInfo proc = new ProcessStartInfo();
                string cmd = string.Format(@"-u{0} -p{1} -h{2} {3} {4} {5}", Id, pwd, serverHost, dbName + "<", path);
                proc.FileName = "mysql";
                proc.RedirectStandardInput = true;
                proc.RedirectStandardOutput = false;
                proc.Arguments = cmd;//"-u root -p smartdb > testdb.sql";
                proc.UseShellExecute = false;
                Process p = Process.Start(proc);
                string res;

                res = file.ReadToEnd();
                p.StandardInput.Write(res);

                // res = p.StandardInput.Write .StandardOutput.ReadToEnd();
                //file.WriteLine(res);
                p.WaitForExit();
                file.Close();
                return "Data restored successfully";

please give me any suggestions

regards,
Mariam
AnswerRe: MySQL restore database through c# Pin
Pavel123123__27-Oct-09 5:32
Pavel123123__27-Oct-09 5:32 
GeneralRe: MySQL restore database through c# Pin
adiono26-Dec-09 23:52
adiono26-Dec-09 23:52 
GeneralRe: MySQL restore database through c# Pin
ogimenezb31-May-11 6:05
ogimenezb31-May-11 6:05 
QuestionSql query designer Pin
Dushan12330-Jun-09 1:28
Dushan12330-Jun-09 1:28 
AnswerRe: Sql query designer Pin
J4amieC30-Jun-09 1:32
J4amieC30-Jun-09 1:32 
GeneralRe: Sql query designer Pin
musefan30-Jun-09 2:16
musefan30-Jun-09 2:16 
GeneralRe: Sql query designer Pin
J4amieC30-Jun-09 2:17
J4amieC30-Jun-09 2:17 
GeneralRe: Sql query designer Pin
musefan30-Jun-09 2:19
musefan30-Jun-09 2:19 
GeneralRe: Sql query designer Pin
musefan30-Jun-09 2:30
musefan30-Jun-09 2:30 
AnswerRe: Sql query designer Pin
K030630-Jun-09 2:06
K030630-Jun-09 2:06 
GeneralRe: Sql query designer Pin
Dushan12330-Jun-09 2:31
Dushan12330-Jun-09 2:31 
AnswerRe: Sql query designer Pin
musefan30-Jun-09 2:18
musefan30-Jun-09 2:18 
AnswerRe: Sql query designer Pin
Pete O'Hanlon30-Jun-09 2:36
mvePete O'Hanlon30-Jun-09 2:36 
Questionshow custom control in aspx page Pin
Pankaj Saha30-Jun-09 1:27
Pankaj Saha30-Jun-09 1:27 
AnswerRe: show custom control in aspx page Pin
Vimalsoft(Pty) Ltd30-Jun-09 1:37
professionalVimalsoft(Pty) Ltd30-Jun-09 1:37 
GeneralRe: show custom control in aspx page Pin
Pankaj Saha30-Jun-09 1:53
Pankaj Saha30-Jun-09 1:53 
QuestionConnect C# win app and ASP.Net/C# website using HttpRequests? Pin
Mtyb30-Jun-09 1:19
Mtyb30-Jun-09 1: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.