【问题标题】:sqlceengine.compact method alternativesqlceengine.compact 方法替代
【发布时间】:2014-03-06 15:18:39
【问题描述】:

除了使用 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 ...

compact 不起作用,我需要另一种方法来保存数据库文件

提前感谢:)

【问题讨论】:

    标签: sql vb.net sql-server-ce


    【解决方案1】:

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

    【讨论】:

    • 这没有提供问题的答案。要批评或要求作者澄清,请在其帖子下方发表评论。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-08-18
    相关资源
    最近更新 更多