Using ASP.NET tables generated by aspnet_regsql.exe in a SQLite database

I’m building a small ASP.NET MVC site where I want to use SQLite. While I already know how I will be connecting to the database (using DbLinq), I don’t understand how to put the ASP.NET tables generated by aspnet_regsql.exe into an SQLite database.

I’ve used the regsql tool before with SQL Server, but never with SQLite. How do I create them for the SQLite DB?

  • mssql giving logins(users) db_owner access to database
  • Using PATINDEX to find varying length patterns in T-SQL
  • SQL : a condition (IF-ELSE) in INSERT INTO
  • SSIS package - loop through different connections for Execute SQL task
  • SQL Server 2008 - Case / If statements in SELECT Clause
  • SQL Server - Add default constraints to all tables
  • One strategy that I think might somehow work is:

    1. Use aspnet_regsql.exe to create the tables into an empty SQL Server database
    2. Script all the objects in the database into T-SQL
    3. Apply the T-SQL to the SQLite DB (how?)

  • How do I find a stored procedure containing <text>?
  • Refresh Application Automatically When Data changed in SQL Server
  • Where I can check user-define table type in SQL Server 2008 in SSMS? and how can I insert new column into it?
  • Unique date range fields in SQL Server 2008
  • Driver.getConnection hangs using SQLServer driver and Java 1.6.0_29
  • Need job scheduler in asp.net
  • 3 Solutions collect form web for “Using ASP.NET tables generated by aspnet_regsql.exe in a SQLite database”

    Take a look at http://salient.codeplex.com

    the Web.SQLite directory contains a drop in replacement for the default SQL providers.

    It was a proof of concept that turned out ok. It uses EF, so is not as performant as it could be but should service low/medium traffic sites without issue.

    You should be able to exclude all other files except that subdirectory and build it in isolation if desired. This will allow you to also trim the references.

    Let me know if you have any issues.

    You could try it with SQL Server Compact Edition 4 which is an embeddable SQL engine like SQLite but has an easier upgrade path if you need to grow it up to SQL Express or SQL Server.

    Unfortunately the aspnet_regsql will not work with SQLite, so your strategy is essentially the correct approach. However, I would suggest looking at something like Roger Martin’s Gallery Server Pro, which uses SQLite and already has the Membership, Role, and Profile provider tables scripted. You can make use of the script. See Roger’s Code Project article from more information.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.