MSSQL to SQLite conversion

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
7/27/2010 9:03:25 PM
Gravatar
Total Posts 1

MSSQL to SQLite conversion

Hi all -

I have a mojoPortal setup and running on a SQL Server 2005, Windows 2008, IIS7. I am now trying to re-point the datasource to a SQLite file, but am encountering some issues...

I've attempted to change the connection string in user.config to both forms of the SQLite connection string:

     <add key="SqliteConnectionString" value="defaultdblocation" /> -->
     <add key="SqliteConnectionString" value="version=3,URI=file:C:\\mojoportal\Web\Data\sqlitedb\mojoportal.db" />
 

When I attempt to visit the portal, I am redirected to "/Setup/Default.aspx" but receive an error that says "The system cannot connect to the MSSQL database. Please check your connection string."

I've also found a currentlog.config file in the "Data" directory, and the error being generated is the following:

2010-07-27 20:53:02,987 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
   at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.SqlClient.SqlConnection.Open()
   at mojoPortal.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
   at mojoPortal.Data.SqlParameterHelper.ExecuteReader()
   at mojoPortal.Data.DBSiteSettings.GetSite(String hostName)
   at mojoPortal.Business.SiteSettings.GetSiteSettings(String hostName)
   at mojoPortal.Business.SiteSettings..ctor(String hostName)
   at mojoPortal.Business.WebHelpers.CacheHelper.LoadSiteSettings()

 

 

So it looks like the setup is still attempting to connect to a SQL Server database. Any ideas on how to fix would be greatly appreciated. Thanks!

 

7/28/2010 7:27:32 AM
Gravatar
Total Posts 18439

Re: MSSQL to SQLite conversion

There is more to it than just changing the connection string. We have a separate package for SQLite that has different data dls and different database scripts. If you want to use SQLite then you need to install the SQLite package of mojoPortal.

My recommendation is if you want a file based database, then use the new SQL CE package for mojoPortal, it has better performance than SQLite and can be migrated back t SQL server if traffic outgrows SQL CE capacity.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.