Please provide samples of command line tool dbmetal to generate code file from a sqlite database.
Asked
Active
Viewed 4,391 times
1 Answers
4
Surfing the internet I found the following command:
DBMetal.exe /namespace:Namespace /provider:SQLite "/conn:Data Source=database.db" /code:CodeFile.cs
Only, the DBMetal version that I downloaded gave an error (Unable to resolve databaseConnectionType: System.Data.SQLite.SQLiteConnection)
I fixed it by downloading the code from the trunk (http://dblinq2007.googlecode.com/svn/trunk), compiling it, and using the generated DBMetal.exe with the above command.

Lukasvan3L
- 693
- 6
- 10
-
also had to pull down the trunk to get it run – Levi Rosol Feb 05 '10 at 16:46
-
2Looking at http://code.google.com/p/dblinq2007/issues/detail?id=212 it appears to be By Design - it works when built from svn because the ado.net provider (System.Data.SQLite.DLL) is in the build output dir - the ado.net providers aren't in the binaries zip, though - it's up to the user to get it into the same dir as dbmetal (or edit the dbmetal.exe.config, as mentioned in the bug). Certainly would be nicer/easier if they could ship some (if not all) of the ado.net providers "in the box" (in the zip), but between licensing and not wanting to track patches/versions for the providers, it's fine – James Manning Mar 17 '10 at 19:38