views:

810

answers:

2

I am not sure how to correct this error.

The type or namespace name `SQLiteConnection' could not be found. Are you missing a using directive or an assembly reference?

I included the reference Mono.Data Mono.Data.Sqlite Mono.Data.SqliteClient and a few non related refs. I am using

//using System.Data.SQLite; //<-- this line was all i needed in msvs
using Mono.Data.Sqlite;
using Mono.Data.SqliteClient;
using System;
using System.Data;
using Mono.Data.SqliteClient
+1  A: 

Hi!
Have you included the references (dll) from http://sqlite.phxsoftware.com/ ?
If not, try to do that, and it should work.

EDIT: The above is if you want to use System.Data.SQLite, but you can also use the built in Mono.Data.SqliteClient that might be better if you use Mono. Read more about it here http://www.mono-project.com/SQLite. In their code example they use SqliteConnection, and you seems to use SQLiteConnection, notice the different case.

fredrik
A: 

Make sure you are referencing the DLL when compiling:

gmcs -r:Mono.Data.SqliteClient.dll myapp.cs

jpobst