Skip to content

Open sqlite database? #187

Answered by nRoger-Env
nRoger-Env asked this question in Q&A
May 15, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Ha you are right. I think I first tried it with a corrupted sqlite DB, which is why I couldn't make it work.
It turns out it is indeed very easy. Exemple with Dapper ORM on top:

using var duckLiteCon = new DuckDBConnection("Data Source=duckDB_Sqlite.sqlite3");
duckLiteCon.Open();
var dataDuckLite = duckLiteCon.Query("SELECT * FROM Table1");
foreach (var item in dataDuckLite)
{
    Console.WriteLine(item.ID);
}
duckLiteCon.Close();

Thanks

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nRoger-Env
Comment options

Answer selected by nRoger-Env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants