question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Xamarin form Can't connect to sqlite

See original GitHub issue

When connect always got this exception

{System.TypeInitializationException: The type initializer for ‘LinqToDB.Data.DataConnection’ threw an exception. —> System.TypeLoadException: Could not load type of field ‘LinqToDB.DataProvider.SqlServer.SqlServerTools:_commandBuilder’ (0) due to: Could not resolve type with token 010000fe from typeref (expected class ‘System.Data.SqlClient.SqlCommandBuilder’ in assembly ’ Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’) assembly:System.Data.SqlClient, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Data.SqlClient.SqlCommandBuilder member:(null)

This is my code IDataProvider dataProvider = new LinqToDB.DataProvider.SQLite.SQLiteDataProvider();

            ConnectionStringSettings connectionString = new ConnectionStringSettings
            {
                Name = "Database",
                ProviderName = "SQLite",
                ConnectionString = "Data Source=" + path 
            };

            using (var db = new DataConnection(dataProvider, connectionString.ConnectionString))
            {
                var td = db.Query<ITEM>("SELECT * FROM ITEMS");
            }

And this is linq2db version capture

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
MaceWinducommented, Jan 2, 2019

And when you try to debug it, exception reports assembly version, not even included in nuget…

source 1

1reaction
MaceWinducommented, Dec 25, 2018

Ouch. Sorrry about that. Can you rollback to lin2db v2.5.4 while it is not fixed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

SQLite Database problem in Xamarin Forms (sqlite-net-pcl)
I'm writing a simple Xamarin Forms mobile app (Android and iOS, ... a blank application and attempted only a simple database connection.
Read more >
Xamarin.Forms Local Databases
This article describes how Xamarin.Forms applications can read and write data to a local SQLite database using SQLite.Net.
Read more >
Store data in a local SQLite.NET database - Xamarin
This article explains how to store data in a local SQLite.NET database, from a Xamarin.Forms Shell application.
Read more >
How To Use an Existing SQLite Database with Xamarin and ...
Join this channel to get access to perks: https://www.youtube.com/channel/GeraldVersluis/ join Disclaimer: this channel is done on personal ...
Read more >
Add Databases to Your App with this Xamarin SQLite Tutorial
A local database can make working with data much easier. In this video we will learn how to get started with SQLite and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found