0

I wrote this code in Webmatrix 2.0 beta:

string Dbfile=HttpContext.Current.Server.MapPath("data/db.db3");
var Db = Simple.Data.Database.OpenFile(Dbfile);

Simple.Data.SimpleDataException: No ADO Provider found.

why??

I'm sure that I have included the reference:

packages.config

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Simple.Data.Ado" version="0.16.1.0" />
  <package id="Simple.Data.Core" version="0.16.1.0" />
  <package id="Simple.Data.Sqlite" version="0.16.0.0" />
  <package id="System.Data.SQLite" version="1.0.80.0" />
</packages>
klashar
  • 2,519
  • 2
  • 28
  • 38
  • Note that Mark cleaned up a lot of "No ADO Provider found" errors in v0.17 and higher. If you haven't already tried this, update your Simple.Data and Simple.Data.Ado packages to 0.18.2.1. – Dan Maharry Oct 16 '12 at 12:56

2 Answers2

1

In my test application conn is the physical path including the the db filename and calling

cn = Database.OpenConnection(conn);

works for me. When I used OpenFile I also received the No ADO Provider error.

I am using (from NuGet):

  • Simple.Data.Core 0.16.1.0
  • Simple.Data.Ado 0.16.1.0
  • System.Data.SQLite 1.0.80.0
  • Simple.Data.Sqlite 0.16.0.0
  • System.Data.SQLite 1.0.80.0
Joe Kuemerle
  • 6,338
  • 1
  • 23
  • 18
0

Getting the dlls required for the System.Data.SQlite can be hassle. If you want to do it quickly then download the Nuget extension for VS 2010. Then you can get the dlls from the extensions console.

Make sure you read the extension installations instructions.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Waleed
  • 514
  • 1
  • 6
  • 17