Jump to content
Xtreme .Net Talk

useless

Members
  • Posts

    3
  • Joined

  • Last visited

useless's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. well im having the same prop I think this has somethig to do with mysql I get the following error -- MySQL dump 9.09 -- -- Host: localhost Database: ddf --------------------------------------------------------- -- Server version 4.0.15-nt c:\mysql\bin\mysqldump.exe: Can't get CREATE TABLE for table `>` (Can't find file: '.\ddf\>.frm' (errno: 22)) Im trying to backup a mysql database but notting works this is the code i got so far Dim mysql_1 As New Process() mysql_1.StartInfo.WorkingDirectory = "c:\mysql\bin" mysql_1.StartInfo.FileName = "c:\mysql\bin\mysqldump.exe" mysql_1.StartInfo.Arguments = "ddf > C:\mysql\bin\test.sql" mysql_1.StartInfo.UseShellExecute = False mysql_1.StartInfo.CreateNoWindow = False mysql_1.StartInfo.RedirectStandardError = True mysql_1.StartInfo.RedirectStandardInput = True mysql_1.StartInfo.RedirectStandardOutput = True mysql_1.Start() mysql_1.StandardInput Dim mysqlout As System.IO.StreamReader = mysql_1.StandardOutput Dim myerror As System.IO.StreamReader = mysql_1.StandardError TextBox1.Text = mysqlout.ReadToEnd & " " & myerror.ReadToEnd This is the same code as you are using but i get a reading from the streamer Any help would be good thx
  2. I found a function that works for me just add a progress bar and you´r set Function DownloadChunks(ByVal sURL As String, ByVal pProgress As ProgressBar, ByVal Filename As String) Dim wRemote As System.Net.WebRequest Dim URLReq As HttpWebRequest Dim URLRes As HttpWebResponse Dim FileStreamer As New FileStream(Filename, FileMode.Create) Dim bBuffer(999) As Byte Dim iBytesRead As Integer Try URLReq = WebRequest.Create(sURL) URLRes = URLReq.GetResponse Dim sChunks As Stream = URLReq.GetResponse.GetResponseStream pProgress.Maximum = URLRes.ContentLength Do iBytesRead = sChunks.Read(bBuffer, 0, 1000) FileStreamer.Write(bBuffer, 0, iBytesRead) If pProgress.Value + iBytesRead <= pProgress.Maximum Then pProgress.Value += iBytesRead Else pProgress.Value = pProgress.Maximum End If Loop Until iBytesRead = 0 pProgress.Value = pProgress.Maximum sChunks.Close() FileStreamer.Close() Return sResponseData Catch MsgBox(Err.Description) End Try End Function
  3. Hi all I want to know how can I get the size of the file being downloaded and the progress status so I can put it in a progress bar. Code: Dim web As New System.Net.WebClient() web.DownloadFile("http://www.somethig.com", CurDir() & "\file.exe") If someone knows I would be very thankfull Thx in advanced..
×
×
  • Create New...