SQLiteConnection.CreateFile

时间:2016-01-17 22:09:08

标签: c# sqlite

SQLiteConnection.CreateFile(Directory.GetCurrentDirectory() + "\\Plugins\\Data.sqlite");

运行时,这会给我这个错误:

  

System.ArgumentException:需要绝对路径信息

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

试试这个:

SQLiteConnection.CreateFile(
    Path.Combine(
        Application.ExecutablePath,
        "Plugins",
        "Data.sqlite"
    )
);