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
0
votes
1 answer

Why is the System.Data.DataTable.ImportRow method inserting a row with no columns?

I have some C# code that looks something like this System.Data.DataRow row; var table = new System.Data.DataTable(); // code that populates the DataRow... table.ImportRow(row); After I call the ImportRow function, a row is inserted into the table,…
raven
  • 18,004
  • 16
  • 81
  • 112
0
votes
0 answers

On a update (There is already a parameter with the name '@xxxxxxx' in this collection.)

I am using VB.NET, Visual Studio 2022, Win 10, MySQLConnector.dll (2.2.6.0) I am trying to integrate MySQL into a framework that is a wrapper for ADO.net. Let me try and create some context. This framework started out as a wrapper for AccessDB, then…
Paul
  • 101
  • 2
  • 10
0
votes
0 answers

System.Data.Common.Utils.Boolean equivalent in .net 6

There is a converter function in System.Data.Common.Utils.Boolean in .net Framework 4.8. I cannot find this namespace in .net 6. Does anybody know where it was moved to? We are specifically looking for a logic expression to DNF format. I have…
0
votes
1 answer

How can I restore System.Data and other files missing from Windows\Microsoft.NET Folder, not restored by repair tool or turning features off and on?

Powershell: Could not load file or assembly ‘System.Data, Version =4.0.0.0. Culture=neutral, PublicKeyToken=b77a5c561934e089’ or one of its dependencies. The system cannot find the file specified. I was able to fix the immediate problem by copying…
Lamont
  • 1
  • 1
0
votes
1 answer

Xml loaded dataset is missing a table

When I read an xml file into a dataset, if the root node has more than one of each child tag, it doesn't create a table for the root node. Why is this? Is there any way to get it to generate the root table without modifying the xml? static void…
Bill Barry
  • 3,423
  • 2
  • 24
  • 22
0
votes
0 answers

'SqlColumnEncryptionKeyStoreProvider' claims it is defined in 'System.Data' error

Severity Code Description Project File Line Suppression State Error CS7069 Reference to type 'SqlColumnEncryptionKeyStoreProvider' claims it is defined in 'System.Data', but it could not be found in file
cherrypye_
  • 49
  • 1
0
votes
1 answer

DataRow.ItemArray does not have values and is empty

my DataRow object is emtpy no matter how I try to initialize it. Here is the source code: private DataTable ReadFileIntoDb(MemoryStream file) { file.Position = 0; var sr = new…
J.Doe
  • 125
  • 1
  • 1
  • 10
0
votes
1 answer

How to fix 'Cannot convert from 'string' to System.Data.SqlDbType' in a Windows Forms Application

This only happens when I created a basic login screen for a sample application I'm building. I have various other functions in the application that read/write/update rows in a database without errors. private void btnLogin_Click(object sender,…
AddieCaddy
  • 21
  • 7
0
votes
2 answers

DataRow.SetField() gives a null ref exception when adding data to a column I previously deleted then added back

UPDATE I think I have found what is causing the issue here https://stackoverflow.com/a/5665600/19393524 I believe my issue lies with my use of .DefaultView. The post thinks when you do a sort on it it is technically a write operation to the…
Kotorfreak
  • 11
  • 6
0
votes
1 answer

Table Property broken after C# Typed DataSet Copy()

I've got a typed DataSet with multiple tables that I want copy, complete with data as well as schema. I can access the tables like so in my original: MyDataSetType dsMyFirstDataSet; MyDataTableType dtTable1; MyDataTableType dtTable2; dtTable1 =…
Fellmeister
  • 591
  • 3
  • 24
0
votes
0 answers

Simple SQL query timing out depending on input parameters

I have a very strange issue where depending on the query parameters the database call from the code below will fail with: Exception.Message = Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server…
Ben
  • 2,518
  • 4
  • 18
  • 31
0
votes
1 answer

Sorting OrderedEnumerableRowCollection .. strings like 00-000, 01-000 are not sorted as expected

i've got some records from a query like this SortingCode (column) Row: 00-005 Row: 00-000 the folowing code, doesn't sort this ... var items = from c in table orderby c.SortingCode select c;
Ruutert
  • 395
  • 1
  • 7
  • 18
0
votes
1 answer

Sometimes Dapper or System.Data not return correct result for simple select query on some databases (SQL Server 2012 and 2019)

I have a simple query that is running a batch operation inside an web api (.net core 3.1) hosted on IIS. The problem is that for some databases (normally the ones with size greather than 10-20GB) the query returns false when the result should be…
Kasbah
  • 47
  • 1
  • 10
0
votes
2 answers

How can I handle this cast exception in C# : system.data.model in system.windows.controls.CheckBox?

This is my model class of analys public partial class analys { public int id { get; set; } public string name { get; set; } public int price { get; set; } public bool Type_qualitatif { get; set; } public…
DOUHADJI
  • 21
  • 5
0
votes
1 answer

System.Data throws NotSupportedException on iOS Unity Build

I want to use DataTable class on iOS. I am implementing DataTable class as you see in the code. It works fine on Android and Standalone builds with Unity. I cannot figure it out why iOS is not woking. The interesting part is the early version of…