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
2 answers

Invalid connection string when connecting to SQL Server Express

I tried every single variation that I could find on the internet. Everything. And still every time I get the very same exception: System.Data.SqlClient.SqlException: 'A network-related or instance-specific error occurred while establishing a…
SharpShade
  • 1,761
  • 2
  • 32
  • 45
0
votes
1 answer

Number of Columns a DataRowView has?

I have a method SelectedRow() that grabs the content of a selected DataGrid row private System.Data.DataRowView SelectedRow() { System.Data.DataRowView row = (System.Data.DataRowView)dgBrokerages.SelectedItems[0]; return row; …
iato
  • 356
  • 5
  • 16
0
votes
2 answers

How to convert 1 and 0s to a bool when creating DataRow using DataRowCollection.Add?

I am trying import some legacy CSV files into my database which were exported with bit/boolean values as 1s and 0s instead of True/False. I'm required to interface with a system that expects DataRow and hence I am using the DataTable.Row.Add(params…
Jack Ukleja
  • 13,061
  • 11
  • 72
  • 113
0
votes
1 answer

Cannot instell System.data.sqlClient in Visual Studio Xamarin project

I previously asked a question concerning azure databases and was given a helpful solution, however to utilise that solution, I needed to install System.Data.SqlClient. I tried installing the NuGet package from microsoft but whenever I do, I get the…
Drew U
  • 443
  • 2
  • 8
  • 17
0
votes
1 answer

Xamarin System.Data.Linq inside PCL

I've got a PCL which includes System.Data.Linq(.Mappings) via the dll itself. This works with iOS, Windows and MacOS, but it does not with Android. Temp: I will post the error message as soon as I am back at work, but I remember it was something…
DirtyNative
  • 2,553
  • 2
  • 33
  • 58
0
votes
1 answer

Sql Connection refuses to connect when using Mono

I have created a simple program to illustrate problem. I have a console application that should connect to a external SQL Server instance. Locally I can connect to this host just fine (whether the be set to the IP address or the external URL that…
Jono_2007
  • 1,016
  • 3
  • 12
  • 23
0
votes
2 answers

DataContext.ExecuteQuery parameter issues

I get the following error: Procedure or function 'procTestReport' expects parameter '@StartDate', which was not supplied. When I execute the following code: String[] args = new String[2]{StartDate.ToShortDateString(),…
Angel Cloudwalker
  • 2,015
  • 5
  • 32
  • 54
0
votes
0 answers

datatable tables[0] error "Cannot find table 0" when using JOIN

I know this has been asked a lot before, but in this case I think it has something to do with using JOIN in the query, because I've run the exact same code with a simple SELECT statement and its always returned a table, AND I've checked the JOIN…
North
  • 109
  • 2
  • 12
0
votes
1 answer

Installing Entity Framework using dnu install - multiple reference issue

I am developing a Web API using VS Code and DNX. At the moment I am in the need of installing Entity Framework. When I am installing the package using dnu install EntityFramework there is no error. It adds the entry "EntityFramework": "7.0.0-beta4"…
Subrata Sarkar
  • 2,975
  • 6
  • 45
  • 85
0
votes
1 answer

Expected exception is not thrown, when DataView.RowFilter is set to incorrect filter

I use System.Data.DataView.RowFilter for table filtration. I have a column "Time" with DateTime datatype and for this column I use following filter: Time<= '15.12.2015 11:38:03.000' But accidently I mistyped dot that separates seconds and…
CodingFeles
  • 374
  • 5
  • 18
0
votes
1 answer

from an EnumerableRowCollection(Of System.Data.DataRow), assign the table to a variable

I have a method that is passed in an EnumerableRowCollection(Of System.Data.DataRow),i want to be able to use the underlying datatable. Ultimately i want to be able to use the columns collection of that datatable. currently i use Dim t As…
thehill
  • 93
  • 11
0
votes
0 answers

Can ordinal column reference in SqlDataReader be different among rows?

This might seem insane but I feel compelled to ask. Assume execution of select * and a resulting SqlDataReader that you read a data row and get N columns. Now read the next row. Is there any chance whatsoever that the order of the columns within…
TonyG
  • 1,432
  • 12
  • 31
0
votes
1 answer

Could not get reference of System.Data in Asp.Net 5

I am building an web application using ASP.NET5 MVC6 and Classic Ado.Net. But we could not take reference of System.Data. Only two packages are available in nuget packages System.Data.Common and System.Data.SqlClient. In addition to that, whenever…
s.k.paul
  • 7,099
  • 28
  • 93
  • 168
0
votes
0 answers

Unhandled exception of type 'System.OverflowException' occurred in System.Data.dll. Arithmetic operation resulted in an overflow

I suddenly started having the following error in more than one C# project only on my PC: An unhandled exception of type 'System.OverflowException' occurred in System.Data.dll Additional information: Arithmetic operation resulted in an…
Saleem
  • 709
  • 2
  • 13
  • 34
0
votes
0 answers

How to set DbParameter value as default. Like we set default in sql insert statement

I know we can set DBnull value to DbParameter like dbParameter.Value = DBNull.Value; Similarly can I set 'default' to DbParameter when I pass parameters to my DbAdapter? Thanks
Venu
  • 184
  • 3
  • 14