如何使用.Net Windows应用程序备份.mdb文件 [英] How to Backup .mdb File Using .Net Windows Application
本文介绍了如何使用.Net Windows应用程序备份.mdb文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
如何使用.Net Windows应用程序备份.mdb文件.
帮帮我...
Hi to All,
How to Backup .mdb file Using .Net Windows Application.
Help me...
推荐答案
Google是您的朋友:很好,经常拜访他.与在这里发布问题相比,他可以更快地回答问题.
您的问题主题:
http: //www.google.co.uk/search?gcx=w&sourceid=chrome&ie=UTF-8&q=Backup+.mdb+File+Using+.Net+Windows [ http://social.msdn.microsoft.com /Forums/zh-CN/vbgeneral/thread/0dacf318-24fa-4962-91b5-69a246c6684d/ [
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
Your question subject:
http://www.google.co.uk/search?gcx=w&sourceid=chrome&ie=UTF-8&q=Backup+.mdb+File+Using+.Net+Windows[^]
Found:
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/0dacf318-24fa-4962-91b5-69a246c6684d/[^]
尝试以下代码:
Try this code :
Public Sub BackUpInformation()
Source = Application.StartupPath & "\DataBaseName.mdb" 'Path where DataBase actually Stored
Path = "New Path to Save Backup"
If GetPath.ToString = "" Then 'If Path is Not set
'Do Nothing
Else 'If Path is set
Try
File.Copy(Source, Path & "\DataBaseNameBackUp.mdb", True) 'Copying file to the Destination
Catch ex As Exception
MessageBox.Show(ex.ToString) 'Providing Error Message
End Try
End If
End Sub
希望对您有帮助. :)
I hope it will help you. :)
尝试
MSDN- [文件复制方法(字符串,字符串,布尔值)] [ ^ ]
Try
MSDN-[File.Copy Method (String, String, Boolean)][^]
这篇关于如何使用.Net Windows应用程序备份.mdb文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文