Questions tagged [system.data]

System.Data is a namespace of the .NET framework. It provides access to classes that represent the ADO.NET architecture.

System.Data is a namespace of the .NET framework. It provides access to classes that represent the ADO.NET architecture.

References

161 questions
1
vote
0 answers

Having exposed System.Data.DataTable into JS via ClearScript how do I express its objects for TypeScript?

So I have an amped up JavaScript scripting environment in my application provided by ClearScript. It dawned on me that I could use TypeScript to write hopefully better code and for the most part that's working out. At the top of each script I have…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
1
vote
1 answer

Unity, How to use AsEnumerable

I need to use AsEnumerable() on a DataTable in Unity, but it seems the Unity version of System.Data doesn't have that method! I tried to import the VS version of dll into the asset, but it told me that Multiple assemblies with equivalent identity…
1
vote
1 answer

How to execute Datatable.Select() query for a column of type System.Color?

I have a DataTable where one of the columns is of type System.Color and whenever I need to query some rows according by color value I can't find the right syntax for that. I need a solution which looks something like: DataRow[] _queried =…
Garuda prasad K
  • 332
  • 3
  • 8
1
vote
1 answer

OdbcDataReader not able to see parameters when executed

When trying to execute a stored procedure using System.Data.Odbc; my application crashes because it is unable to find the parameter "@report". This is my code: DataTable information = new DataTable(); OdbcCommand cmd = new…
Todd Owen
  • 97
  • 1
  • 9
1
vote
1 answer

Unity 2018.2.17 with SQLite: MonoBleedingEdge error?

I have used SQLite on my Unity game without problems until now: today I was prompted with an update for Unity (to 2018.2.17), and after updating I can't build anymore my games. There is now a conflict between my project's System.Data.DLL and another…
pertz
  • 394
  • 4
  • 14
1
vote
0 answers

Reference to type 'SqlConnection' claims it is defined in 'System.Data', but it could not be found

I'm trying to build a .NET standard app in VS2017, but when trying to create a SQL Connection, I get the following error: Reference to type 'SqlConnection' claims it is defined in 'System.Data', but it could not be found Note the error does not…
Mike Baron
  • 818
  • 2
  • 9
  • 17
1
vote
2 answers

How to mock DbConnectionStringBuilder?

Here's a simple code which reproduces an exception: var csbMock = new Mock(); var csb = csbMock.Object; csb.ConnectionString = "data source=.;integrated security=true"; Debug.WriteLine(csb.ConnectionString); //…
astef
  • 8,575
  • 4
  • 56
  • 95
1
vote
1 answer

What is async in System.Data.Common.DbDataReader.ReadAsync?

I am looking at the code for DbDataReader (also DbCommand) at MS reference and can't figure out what is async in ReadAsync() method. virtual public Task ReadAsync(CancellationToken cancellationToken) { if…
gajo357
  • 958
  • 12
  • 22
1
vote
1 answer

Fakes: Downcast SqlConnection to DbConnection

How can I get this fake to work? I'd expect the last Assert to pass. System.Data.fakes Test.cs using System.Data.Common; using…
David
  • 19,389
  • 12
  • 63
  • 87
1
vote
1 answer

How to convert IEnumerable> to DataTable?

C#.net, .Net Framework 4.5, VS 2015 I get DataTable as input for the method. Need to sort in specific way (below): by first element in groups of two. And then must to return sorting results as DataTable. I found how to sort incoming DataTable rows,…
Karen Slon
  • 233
  • 1
  • 4
  • 16
1
vote
0 answers

How to Solve 'SqlCommand' exists between in .net Core?

I try use Oracle write in DLL then into my .NET Core program, but it appears the following error message: This type 'SqlCommand' exists between 'System.Data.SqlClient, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and…
Rakare
  • 11
  • 4
1
vote
2 answers

How to connect to SQL database on a Windows CE Application for ARM

I'm trying to send queries to a SQL database from a Windows CE 7 C++ application running on an ARM architecture. During my research I found several possibilities to do this: Use methods from system.data.sqlclient Doesn't work, since the…
Simon D
  • 323
  • 2
  • 3
  • 9
1
vote
0 answers

How to implement data access in Xamarin.Android

We are investigating the possibility of using Xamarin.Android to build software for internal business devices that run Android. These devices are locked to a specific internal WiFi network to which we can give access to our databases using network…
1
vote
4 answers

stackoverflow exception in DataView row filter

I am getting "An unhandled exception of type 'System.StackOverflowException' occurred in System.Data.dll" in my DataView rowfilter property. I'm not getting any stack trace for that. So can any one help me on that. Please find below the code where…
mehul9595
  • 1,925
  • 7
  • 32
  • 55
1
vote
0 answers

Unable to add reference to certain assemblies in VS2015 MVC project

I am relatively new to MVC, so maybe I am missing something. I am using VS 2015 Community Edition, C# 2015 & .NET Framework 4.5.2. I have an MVC solution with 2 projects: TLM and TLM.Tests. All the .cs files in both projects are happy with the…