How to use zip or gzip in vb.net? -


just wanna ask how can apply zip or gzip in code? want save .sql file @ same time compressed.

imports mysql.data.mysqlclient imports system.data.sqlclient imports system.io imports system.io.compression imports system.text imports system.text.regularexpressions  sub export()         dim file string         dim clientid = frmdashboard.txtclientid.text         savefiledialog1.filter = "sql dump file (*.sql)|*.sql|all files (*.*)|*.*"         savefiledialog1.filename = "cust" + clientid + ".sql"         if savefiledialog1.showdialog = dialogresult.ok             file = savefiledialog1.filename             dim myprocess new process()             myprocess.startinfo.filename = "cmd.exe"             myprocess.startinfo.useshellexecute = false             myprocess.startinfo.workingdirectory = "c:\program files\mysql\mysql server 5.7\bin"             myprocess.startinfo.redirectstandardinput = true             myprocess.startinfo.redirectstandardoutput = true             myprocess.start()             dim mystreamwriter streamwriter = myprocess.standardinput             dim mystreamreader streamreader = myprocess.standardoutput             dim status = ""             mystreamwriter.writeline("mysqldump --skip-add-drop-table --no-create-info -u administrator --password=sample -h localhost cashloan clientcustomers --where=""status='" + status + "' , clientid='" + clientid + "'"" > """"" + file + """"" ")              mystreamwriter.flush()             mystreamwriter.close()             myprocess.waitforexit()             myprocess.close()          end if     end sub 

hope me here. thanks!


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -