如何在vb.net上对数据库的备份和恢复进行编码 [英] how to code backup nd recovery of database on vb.net
本文介绍了如何在vb.net上对数据库的备份和恢复进行编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在3层应用程序设计中编写数据库备份和恢复的代码.
请帮助
[从OP解决方案插入]
how to code backup and recovery of database on 3-tier application design.
please help
[inserted from OP solution]
Function backup_database() As DataTable
Dim dal As New csSQLDALVB
Dim list As New List(Of csParameterListType)
Return dal.executespreturndt("BackupD_mydatabase", list)
End Function
Function restore_database() As DataTable
Dim dal As New Restore_database
Dim list As New List(Of csParameterListType)
Return dal._datatable("RESTORE_DATABASE", list)
End Function
End Class
是的-使用SQL Server.这是我在业务层和演示文稿上的功能,我这样称呼它
Yes m using sql server. this is my functions on business layer and on presentation i called it like this
Dim restore As New BACKUP_recovery
restore.restore_database()
我必须在Sql服务器上做什么?
what must i do on the Sql server?
推荐答案
使用VB.NET和SQL-DMO(新版本)的SQL Server数据库备份实用程序 [ ^ ]
这取决于您的数据库是什么.对于SQL Server,可以在T-SQL
中编写BACKUP
和RESTORE
查询,并使用ADO.NET从VB.NET代码中调用它们.对于Oracle和MySQL,也存在类似的命令.
It depends on what your database is. For SQL Server, you can writeBACKUP
andRESTORE
queries inT-SQL
and call them from your VB.NET code using ADO.NET. Similar commands exist for Oracle and MySQL.
这篇关于如何在vb.net上对数据库的备份和恢复进行编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文