문제

is there an alternative way to save a database file other than using sqlceengine.compact method ? this is my code :

 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 doesn't work and i need an other way to save the database file

thanks in advence :)

도움이 되었습니까?

해결책

You can use System.IO.File.Copy

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top