如何使用vb在sql server中保存.zip或.Rar文件? [英] How to save .Zip or .Rar file in sql server using vb ?

查看:70
本文介绍了如何使用vb在sql server中保存.zip或.Rar文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


i需要在sql server中存储zip文件并检索它,如果提取该文件它不能被损坏的zip文件,那么回复我如何将sql server中的zip文件存储为二进制文件并以zip方式返回来自sql server in vb。



请尽快回复我

问候

Aravind

Hi i need to store zip file in sql server and retrieve it,if extract that file it could not be corrupted zip file,so reply me how store zip file in sql server as binary and also get back as zip from sql server in vb.

pls reply me asap
Regards
Aravind

推荐答案

' Open an existing file.
Dim zip As New Zip()
zip.Open("test.zip")
Dim options As New TransferOptions(False, RecursionMode.ScanAllSubDirectories, True, "*.doc", FileExistsResolveAction.OverwriteAll, SymlinksResolveAction.Skip, True)
' Extract all .doc files
zip.ExtractAll("c:\temp", options)
' Extract all files except *.tmp files.
options.SearchCondition = Not SearchCondition.Masks("*.tmp")
zip.ExtractAll("c:\test", options)
' Extract all files in folder 'my archive folder' within the archive to 'c:\temp'.
zip.ExtractFiles("my archive folder", "c:\temp")
' Extract *.css files in folder 'my archive folder' within the archive to 'c:\temp'.
zip.ExtractFiles("my archive folder/*.css", "c:\temp")
' Extract *.css and *.dat files in folder 'my archive folder' within the archive to 'c:\temp'.
zip.ExtractFiles("my archive folder/*.css;*.dat", "c:" & Constants.vbTab & "emp")
' Another way to extract files with search pattern
zip.ExtractFiles("/abc", "c:\abc", "*.dat;*.dll")
' #Region "Extract to a Tar file system"
Dim tar As New Tar()
tar.Create("test.tar")
' Extract all files to the tar file system.
zip.ExtractAll(tar, "/", FileExistsResolveAction.OverwriteAll)
tar.Close()
' #End Region
' Close the zip file.
zip.Close()





如有疑问请参考此链接

http://www.componentpro.com/doc/zip/Extracting_files_from_an_archive.html [ ^ ]


访问此处了解...



.rar或.zip保存到SQL Server [ ^ ]
visit Here to understand...

.rar or .zip saved to SQL Server[^]


这篇关于如何使用vb在sql server中保存.zip或.Rar文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆