Do not use Directory.getCurrentDirectory under the .NET Compact Framework, otherwise it will cause an exception, you can use the following method:
Imports System.IO ....... Private RunAppDir As String Private DatabaseFile As String ....... 'run directory acquisition program and database files path string RunAppDir = Path.GetDirectoryName (System.Reflection.Assembly.GetExecutingAssembly () .Getname (). Codebase) DatabaseFile = Runappdir & "/Abpm.sdf"