以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 代码失效,如何解决? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=190881) |
-- 作者:lin98 -- 发布时间:2024/3/11 9:37:00 -- 代码失效,如何解决? Dim Proc As New Process proc.StartInfo.FileName = "cmd.exe" proc.StartInfo.CreateNoWindow = True proc.StartInfo.WorkingDirectory = "D:\\MY\\bin" MsgBox(0) proc.StartInfo.UseShellExecute = False proc.StartInfo.RedirectStandardInput = True proc.StartInfo.RedirectStandardOutput = True proc.StartInfo.RedirectStandardError = True proc.Start() \'proc.Standardlnput.WriteLine("mysql -uroot -proot") MsgBox(1) proc.StandardInput.WriteLine("t33") MsgBox(2) Dim s As String = FileSys.ReadAllText("D:\\BF\\t33-5.sql") For Each s1 As String In s.replace(vbcr, "").split(vblf) proc.StandardInput.WriteLine(s1) Next proc.Close() MsgBox(3) 上面代码:还原MYSQL数据库,执行没报错,但也没有还原,如何解决?
[此贴子已经被作者于2024/3/11 16:27:26编辑过]
|