dataset

Datatable vs Dataset

I current use a datatable to get results from a database which I can use in my code. However, many example on the web show using a dataset instead and accessing the tables through the collections method. Is there any advantage, performance wise or otherwise, of using datasets or datatables as a storage method for sql results?...

Is there some way of recycling a Crystal Reports dataset?

I'm trying to write a Crystal Report which has totals grouped in a different way to the main report. The only way I've been able to do this so far is to use a subreport for the totals, but it means having to hit the data source again to retrieve the same data, which seems like nonsense. Here's a simplified example: date name ...

C#: What Else Do You Use Besides DataSet

I've found myself increasingly unsatisfied with the DataSet/DataTable/DataRow paradigm in .Net, mostly because it's often a couple of steps more complicated than what I really want to do. In cases where I'm binding to controls, DataSets are fine. But in other cases, there seems to be a fair amount of mental overhead. I've played a bit...

PHP Script to populate MySQL tables

Is anyone aware of a script/class (preferably in PHP) that would parse a given MySQL table's structure and then fill it with x number of rows of random test data based on the field types? I have never seen or heard of something like this and thought I would check before writing one myself. ...

Get the DefaultView DataRowView from a DataRow

Here's the situation: I need to bind a WPF FixedPage against a DataRow. Bindings don't work against DataRows; they work against DataRowViews. I need to do this in the most generic way possible, as I know nothing about and have no control over what is in the DataRow. What I need is to be able to get a DataRowView for a given DataRow...

VB.NET Get underlying system.type from nullable type

I'm attempting to create a dataset based on the properties of an object. For example, I have an instance of a Person class with properties including ID, Forename, Surname, DOB etc. Using reflection, I'm adding columns to a new dataset based on the object properties: For Each pi As PropertyInfo In person.GetType().GetProperties() Dim...

Handling XSD Dataset ConstraintExceptions

Does anyone have any tips for dealing with ConstraintExceptions thrown by XSD datasets? This is the exception with the cryptic message: System.Data.ConstraintException : Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. ...

DBUnit dataset generation

I am looking for a simple tool to generate a DBUnit dataset from existing data in a database. Namely I need to be able to construct a query of a limited amount of that data, and just use these results for the dataset. Eclipse has a tool, but as far as I can tell, it only lets you pull all data out of a given table, but that is much too...

Read Access File into a DataSet

Is there an easy way to read an entire Access file (.mdb) into a DataSet in .NET (specifically C# or VB)? Or at least to get a list of tables from an access file so that I can loop through it and add them one at a time into a DataSet? ...

What are the disadvantages of Typed DataSets

I come from a world that favors building your own rather than rely on libraries and frameworks built by others. After escaping this world I have found the joy, and ease, of using such tools as Typed DataSets within Visual Studio. So besides the loss of flexibility what else do you lose? Are there performance factors (disregarding the pro...

Object initialization in C# (.Net)

Is there a difference (performance, overhead) between these two ways of initializing an object: MyTypedDataSet aDataSet = new MyTypedDataSet(); aDataSet .Merge(anotherDataSet); aDataSet .Merge(yetAnotherDataSet); and MyTypedDataSet aDataSet = anotherDataSet; aDataSet .Merge(yetAnotherDataSet); Which do you recommend? ...

Select rows in dataset table based on other dataset table

I have a dataset that has two tables in it. I want to do the following (or something like it) is it possible and is how I have it correct? dsTabData.Tables("FilingTabs").Select("fs_ID not in (select fsp_fsid from ParentTabs)") how do you reference data from other table in the same dataset? ...

DataSet.Select and DateTime

How can I use .NET DataSet.Select method to search records that match a DateTime? What format should I use to enter my dates in? ...

How to convert Typed DataSet Scheme when one of the types was changed?

I got a typed (not connected) dataset, and many records (binary seriliazed) created with this dataset. I've added a property to one of the types, and I want to convert the old records with the new data set. I know how to load them: providing custom binder for the BinaryFormatter with the old schema dll. The question is how can I convert...

How many DataTable objects should I use in my C# app?

Hi all, I'm an experienced programmer in a legacy (yet object oriented) development tool and making the switch to C#/.Net. I'm writing a small single user app using SQL server CE 3.5. I've read the conceptual DataSet and related doc and my code works. Now I want to make sure that I'm doing it "right", get some feedback from experienced...

Should I return a strongly typed dataset from a webservice?

Should I expose a strongly typed dataset from a webservice and bind it directly in a client? or are there more sensible ways for asmx web services? I am doing CRUD operations (Create, Read, Update, Delete). I find working with datasets to be frustrating and difficult to work with when for example when inserting into a table within it f...

Point ADO.Net DataSet to different databases at runtime?

I have a large ADO.Net dataset and two database schemas (Oracle) with different constraints. The dataset will work with either schema, but I want to be able to tell the dataset which schema to use (via connection string) at runtime. Is that even possible? ...

Why is a SQL float different from a C# float

Howdy, I have a DataRow pulled out of a DataTable from a DataSet. I am accessing a column that is defined in SQL as a float datatype. I am trying to assign that value to a local variable (c# float datatype) but am getting an InvalidCastExecption DataRow exercise = _exerciseDataSet.Exercise.FindByExerciseID(65); _AccelLimit = (float...

What triggers ConstraintException when loading DataSet?

How can I find out which column and value is violating the constraint? The exception message isn't helpful at all: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. ...

How do I refresh the relationships in a dataset?

I a working in VisualStudio 2005. I have a dataset with sevaral datatables in it already. I had to modify the database to add a new foreign key that I forgot about. How do I get visual studio to recognize the new relationship? ...