Javascript SQLite db management and c# code

Hello everyone

I have a c# code and I would like to connect it with a SQLite local db; I read that c# has some problem to connect to SQLite, but with Javascript is all right.

So I imported the class dbAccess from here

and I made all the methods static to access them from a c# file. I have no troubles using the “OpenDB” function, but the query function “BasicQuery” returns a System.Data.IDataReader type, and I need the same type to store the result in my c# file.

but in this way I get the following c# error:

error CS0234: The type or namespace name ‘Data’ does not exist in the namespace ‘System’, maybe you forgot to add an assembly reference?

So I had add “System.Data.dll” in the asset folder; and now I get this js error.
BCE0021: Namespace ‘System.Data’ not found, maybe you forgot to add an assembly reference?

What can I do?

Thanks in advance

Can you post your script?
Basically what is happening is that you are calling something from another namespace.
Try using Data.
What IDE do you use? Try adding System.Data.dll as a reference if you use VisualStudio

Thanks to everyone for the interest in my problem; I’m sorry but I have changed my sql db in .txt a pair of week after this thread. I’m still interested in solutions for other projects.

I resumed the original script (c#):

using UnityEngine;

using System.Collections;

using System.Data;

public class Test : MonoBehaviour {

void Start () {}

public void Awake () {


System.Data.IDataReader ciro=dbAccess.BasicQuery(“SELECT * WHERE 1”, true);



The JS code is the same of the linked example

I use Mono Develop; I tried to add System.Data in the Mono folder (“MonoDevelop\bin”), but it doesn’t produce effects; where exactly I should put this file? Some threads suggested paths that no loger exists in recent versions of mono…

(dbAccess.SingleSelectWhere gives the same problem )

I tried several combination of using System.Data, but Data is not spontaneously suggested by Mono. It reacts only with the phisical addiction of the file, in the described way. On the other hand JS can access System.Data.