system.data

How do You Get a Specific Value From a System.Data.DataTable Object?

I'm a low-level algorithm programmer, and databases are not really my thing - so this'll be a n00b question if ever there was one. I'm running a simple SELECT query through our development team's DAO. The DAO returns a System.Data.DataTable object containing the results of the query. This is all working fine so far. The problem I h...

What does "Child list for field ... cannot be created" mean?

My C# coded application uses an Infragistics.Win.UltraWinGrid.UltraGrid to display some data. The data is basically a collection of computers. The application is able to filter these computers (like "Workstations", "Servers" etc) for viewing. This is how I filter: private DataView FilterTableDataForViewing(DataTable originalTable, strin...

Where should I create my DbCommand instances?

I seemingly have two choices: Make my class implement IDisposable. Create my DbCommand instances as private readonly fields, and in the constructor, add the parameters that they use. Whenever I want to write to the database, bind to these parameters (reusing the same command instances), set the Connection and Transaction properties, th...

System.Data missing in F# project

I'm targeting .NET 3.5, but cannot get System.Data to come up in Intellisense. What am I missing? ...

Is there a limit to the number of DataColumns I can add to a DataTable?

I can't find any references to there being a limit to the number of DataColumns I can add to a DataTable. The DataTable will not be generated from a SQL query, but rather synthesized from other data. Thanks, Matthew ...

Create custom driver for System.Data.Common

Background: Our C# application generates and executes queries to several types of databases (Oracle, SQL Server, MySQL), but a requirement came up to also apply them to a proprietary file format. The namespace used until now is System.Data.Common. The queries we need to apply are non-trivial (nested SELECTs, aliases in FROM, substring...

ASP.NET MVC - System.Data.DataSet not referenced problem

Hi There, Well, first of all sorry about this question it must be pretty straight forward for you guys but I'm struggling myself on it, and I need to make it work :( Well I'm trying t o use DataSet on my application and when I render it I got: The type 'System.Data.DataSet' is defined in an assembly that is not referenced. You must add...

System.Data in Mono

Has System.Data in Mono been expanded to include extra functionality? I'm attempting to make use of the SQL Parser written for Mono in Mono.Data.SqlExpressions but when all the classes in the SqlExpressions namespace have been included the project still fails to compile because the classes in System.Data do not match. Example, System.Dat...

Help Optomizing Bulk Inserts into Oracle Using VB.NET

I am inserting a block of 5000 records at a time, one block right after the other. The commands are created in a seperate DLL and can call anyone of 4 different stored procedures. Is there a bulk insert method that might speed this up. Currrently it takes about 1.5 MS per record and would like to get this down to about .7 MS. Thanks,...

.NET/ADO.NET: Detecting Connection Pool Limits

I am getting connection timeouts and I suspect they may be caused by a bug that is allowing me to exceed my connection pool limit. Is there a way to progamatically detect this? ...

Getting value from field in DataTable when column name has spaces

I have tried: ObjDTOleDBNFeIntegra.Rows(I)("[Cnpj Cpf]").ToString() //with brackets ObjDTOleDBNFeIntegra.Rows(I)("'Cnpj Cpf'").ToString() //with apostrophe ObjDTOleDBNFeIntegra.Rows(I)("Cnpj Cpf").ToString() //without anything I'm using VB.NET, but comments with apostrophes in here don't seem to be identified. And I get the exc...

Error in DropDownList using ASP.NET

Hey, I have a DropDownList called (DDL) in ASP.net page, I want that DDL contains some records of a table in the data base. So I did this : DDL.DataSource = myDataReader DDL.DataBind() But it's giving me (5 records) "the number of records of the table" but like this : System.Data.Common.DataRecordInternel System.Data.Common.DataRe...

Can I configure AutoMapper to read from custom column names when mapping from IDataReader?

Psuedo code for mapping configuration (as below) is not possible since the lambda only lets us access Type IDataReader, wheras when actually mapping, AutoMapper will reach into each "cell" of each IDataRecord while IDataReader.Read() == true: var mappingConfig = Mapper.CreateMap<IDataReader, IEnumerable<MyDTO>>(); mappingConfig.ForMembe...

Querying DBF file with System.Data.Odbc.OdbcConnection when file path/name has space

I'm trying to query a DBF file using System.Data.Odbc.OdbcConnection. It works correctly when the file doesn't have a space in it, but I get the following error "Error opening DBF File: ERROR [42000][Microsoft][ODBC dBase Driver]Syntax error in FROM clause" if the file path or name has a space in it. I'm using the following code: oConn...

stackoverflow exception in DataView row filter

Hi All, 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 i'm getting the error in filterView. DataSet metalAttributeDS = L...