- Home /
Cannot use System.data as reference
This has been asked many times without an answer. I want to use System.data to use the OleDB package to create a connection to my MS access database.I have tried adding it as a reference in monodevelop , and by adding the System.data.dll into my unity project.
By adding the System.data reference in mono, it compiles but I continously get :
error CS0234: The type or namespace name
Data' does not exist in the namespace
System'. Are you missing an assembly reference?
from the unity program.
By adding the System.data.dll to unity in the assets folder I receive :
-Internal compiler error. See the console log for more information. output was: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. File name: 'System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at (wrapper managed-to-native) System.Reflection.MonoMethodInfo:get_method_info (intptr,System.Reflection.MonoMethodInfo&) at System.Reflection.MonoMethodInfo.GetMethodInfo (IntPtr handle) [0x00000] in :0 at System.Reflection.MonoMethodInfo.GetAttributes (IntPtr handle) [0x00000] in :0 at System.Reflection.MonoMethod.get_Attributes () [0x00000] in :0 at System.Reflection.MethodBase.get_IsVirtual () [0x00000] in :0 at Mono.CSharp.MemberCache.AddMethods (BindingFlags bf, System.Type type) [0x00000] in :0 at Mono.CSharp.MemberCache.AddMethods (System.Type type) [0x00000] in :0 at Mono.CSharp.MemberCache..ctor (IMemberContainer container) [0x00000] in :0 at Mono.CSharp.TypeHandle..ctor (System.Type type) [0x00000] in :0 at Mono.CSharp.TypeHandle.GetTypeHandle (System.Type t) [0x00000] in :0 at Mono.CSharp.TypeHandle.GetMemberCache (System.Type t) [0x00000] in :0 at Mono.CSharp.TypeManager.MemberLookup_FindMembers (System.Type t, MemberTypes mt, BindingFlags bf, System.String name, System.Boolean& used_cache) [0x00000] in :0 at Mono.CSharp.TypeManager.RealMemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in :0 at Mono.CSharp.TypeManager.MemberLookup (System.Type invocation_type, System.Type qualifier_type, System.Type queried_type, MemberTypes mt, BindingFlags original_bf, System.String name, IList almost_match) [0x00000] in :0 at Mono.CSharp.Expression.MemberLookup (Mono.CSharp.CompilerContext ctx, System.Type container_type, System.Type qualifier_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) [0x00000] in :0 at Mono.CSharp.Expression.MemberLookupFinal (Mono.CSharp.ResolveContext ec, System.Type qualifier_type, System.Type queried_type, System.String name, MemberTypes mt, BindingFlags bf, Location loc) [0x00000] in :0 at Mono.CSharp.New.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0 at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in :0 at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0 at Mono.CSharp.Assign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0 at Mono.CSharp.SimpleAssign.DoResolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0 at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec, ResolveFlags flags) [0x00000] in :0 at Mono.CSharp.Expression.Resolve (Mono.CSharp.ResolveContext ec) [0x00000] in :0 at Mono.CSharp.ExpressionStatement.ResolveStatement (Mono.CSharp.BlockContext ec) [0x00000] in :0 at Mono.CSharp.StatementExpression.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0 at Mono.CSharp.Block.Resolve (Mono.CSharp.BlockContext ec) [0x00000] in :0 at Mono.CSharp.ToplevelBlock.Resolve (Mono.CSharp.FlowBranching parent, Mono.CSharp.BlockContext rc, Mono.CSharp.ParametersCompiled ip, IMethodData md) [0x00000] in :0
Please could someone help, the database is integral to the whole game ,and I cannot use anything else but this MS access DB for the project
Your answer
![](https://koobas.hobune.stream/wayback/20220613092405im_/https://answers.unity.com/themes/thub/images/avi.jpg)