且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在vb中进行备份和恢复

更新时间:2022-11-03 09:24:44

交换源和目的地...

Swap the source and destination over...
Dim portfolioPath As String = My.Application.Info.DirectoryPath
FileCopy("D:\Backup\patientrecord.mdb", portfolioPath & "\patientrecord.mdb")





更正双引号位置[\ edit]



[edit] Corrected double quote position[\edit]


如果你在谈论备份和恢复Access数据库(MDB) [ ^ ],你很接近找到解决方案,因为你正在使用类似这样的方法:如何在vb.net中备份ms访问数据库? [ ^ ]



但是......我建议您使用MS Access 压缩数据库 [ ^ ]方法。如果您想访问MS Access应用程序的其他方法,请参阅:如何从Visual Basic .NET自动执行Microsoft Access [ ^ ]
If you're talking about Back up and restore an Access database (MDB)[^], you're quite close to find a solution, because you're using the method similar to this: How to backup ms access database in vb.net?[^]

But... I would suggest you to use MS Access Compact Database[^] method. If you would like to access to the other methods of MS Access application, please refer this: How To Automate Microsoft Access From Visual Basic .NET[^]