SQL Access problem

Hello.

i would like to do sql access to unity3d
but when i
referenced System.Data.dll , unity give error and when i re-open unity everything turn to back nand delete all referances.
i could not work with SQL.

how can i fix it.

Error name:

1: Assets/Restaurant/Codes/DataAccess/DAL.cs(2,14): error CS0234: The type or namespace name Data' does not exist in the namespace System’. Are you missing an assembly reference?

2: Assets/Restaurant/Codes/DataAccess/DAL.cs(32,23): error CS0246: The type or namespace name `SqlDataReader’ could not be found. Are you missing a using directive or an assembly reference?

3: Assets/Restaurant/Codes/DataAccess/DAL.cs(2,14): error CS0234: The type or namespace name Data' does not exist in the namespace System’. Are you missing an assembly reference?

4: Assets/Restaurant/Codes/DataAccess/Table.cs(3,14): error CS0234: The type or namespace name Data' does not exist in the namespace System’. Are you missing an assembly reference?

Are you NET2.0 or Subset?

A lot of mono dll’s are included by default, I’m not sure if System.Data is among those. Perhaps simply setting the .NET2.0 as Morning suggests could fix it.

If they’re not part of the usual “.NET2.0” package in Unity you can still include them. The way to reference dll’s in Unity is simply to add them to the project as assets… just drag and drop them into the project. After that you just do your normal “using System.Data;” in your cs files and it works.

It could also be that are feeding Unity .NET assemblies that are not mono compliant. Try grabbing the System.Data dll from your Unity installation. In my case: C:\Program Files (x86)\Unity\Editor\Data\Mono\lib\mono\2.0.

Hope this helps,
UnLogick

I wonder why can’t we just do using for all the included mono libs without having to move them around? I had to do that when using sqlite and I have no idea why couldn’t I just do using and let unity handle the rest. The dlls are there, why can’t I use them?