With System.Data.SQLite how do you specify a database file in the connect string using a relative path

前端 未结 3 632
醉梦人生
醉梦人生 2020-12-10 04:54

Wanting to deploy my project on different servers I would prefer to be able to specify a connect string using a relative path. I can\'t seem to get that to work and want to

3条回答
  •  攒了一身酷
    2020-12-10 05:14

    Like this:

    String currentPath = System.IO.Path.GetDirectoryName( Application.ExecutablePath );

提交回复
热议问题