Are there any issues with using SQLite and SubSonic in a windows service. (have only tested on Vista)
edit:
I have a windows application and windiows service that needs to run on the same database. The windows app works fine (after adjusting the connection string and compiling the SubSonic Core with the updates mentioned here http://www.integratedwebsystems.com/2009/11/playing-with-sqlite-subsonic3-and-repository-mode ). I get a message from the service indicating it's unable to open the database. I have both executables in the same place with the database in an App_data folder. The service is running under it's default user as installed. The service in this instance is running on its own.
I am taking advantage of "RunMigrations" to set up the database. The Application and Service first checks the version of the database, then runs various List funtions to ensure the database tables are created.
The first bit of code (part of a very basic object/DAL layer) looks like this:
public static DatabaseInfo Get()
{
var repository = Made4Print.SQLite.Repository;
var databaseInfos = (from database in repository.All<DatabaseInfo>()
select database).Take(1);
if (databaseInfos.Count() > 0)
{
var databaseInfo = databaseInfos.First();
databaseInfo._IsNew = false;
databaseInfo._CurrentID = databaseInfo.ID;
return databaseInfo;
}
var newDatabaseInfo = new DatabaseInfo();
newDatabaseInfo = newDatabaseInfo.Save();
return newDatabaseInfo;
}
Method to get provider look like this:
public static IDataProvider GetProvider()
{
string connectionString = @"Data Source=App_Data\Database.db; Version=3; New=True; Pooling=True;Max Pool Size=20; Journal Mode=Off";
return ProviderFactory.GetProvider(connectionString, "System.Data.SQLite");
}