2014-03-06 116 views
1

是否有另一种方法来保存数据库文件,而不是使用sqlceengine.compact方法? 这是我的代码:sqlceengine.compact方法替代

Dim engine As New SqlCeEngine("Data Source = " + Path + databasename) 
      If Directory.Exists("\" & otherPath) Then 
       If File.Exists("\" & otherPath & "\" databasename) Then 
        File.Delete("\" & otherPath & "\" databasename) 
       End If 
       engine.Compact("Data Source= \" & otherPath & "\" databasename) 
      end if ... 

致密不工作,我需要一个其他的方式来对数据库文件保存前请先:)

感谢

回答

0

您可以使用System.IO.File.Copy

+0

这没有提供问题的答案。要批评或要求作者澄清,请在其帖子下方留言。 – TN888

+0

它为我的案件工作 – essanousy