dataset

Converting XML with mixed complex type elements into DataSets, and other DataSet limitations

This is a two part question. The first is a specific question about DataSets and XML. The second is a more general "am I taking the right approach" type question. While I'd certainly appreciate replies that answer both questions, I'd also welcome answers that only tackle one or the other! Question 1 Does the DataSet class support mixed...

problem with BindingContext in c#

Hi every body! I used sqlDataAdapter to fill one of my DataTables in a dataset. although the count of that table is 2 but the count of bindingContext is zero. what shoud I do to solve this problem? here is my code: sqldapT1_AutoRequest.Fill(ds.t1_AutoRequest); if(this.BindingContext[ds,"t1_AutoRequest"].Count <= 0) return; ...

Custom Code Behind for DataSet

I used to be able to double-click the work area of a dataset to create and load a code-behind page for it, where i could define some custom code to modify or extend the functionality. I don't know if it's because I'm using VS 2008, but now that doesn't happen, and the only file "beneath" the xsd file is the xss code which is auto-genera...

Performance concerns between DataSet and StoreProcedure

Hi everyone! I have to develop one program that consists Data manipulation (Retrieve data, Update Data and New insert data) to multiple tables. Which will be suitable approach and faster in performance using DataSet Object and Storeprocedure with CURSOR object? Please point me out. Thanks you all! ...

DataSet and Primary Key with multiple columns

How Can I use Find method in DataSet that has Primary Key make of 3 Columns? dadSample.SelectCommand = New SqlCommand("SELECT * FROM StockBalance", conxMain) dadSample.FillSchema(dsSample, SchemaType.Source, "StockBalance") dadSample.Fill(dsSample, "Stock") Dim keyColStock(3) As DataColumn keyCol...

Two SqlCommand Objects and Updating One Source Table

I have two update sql statements for two SqlCommand object to update one DataTable with DataSet object to One Source Table. When I click on update button that's update only the first one and the second SqlCommand Object doesn't work. What's it? DataTable didn't support two Command object at one time? I write as follow: Dim conxMain As N...

How do we solve all this "Conversion from type DBNull to type String is not valid" nastiness?

In our applications, I can't think of many cases where we care about null string fields. We just want them to show as empty strings in most situations. So when using the built in ADO.NET dataset / datatables, the error: Conversion from type DBNull to type String is not valid is all too common later on in the app when referring...

Datasets do not regenerate code behind.

So I was lucky enough to inherit a project where someone decided to use datasets as a model. The problem is that a column has been added to table in the database. Using the dataset desinger I added the column to the table and tryied to run the 'Custom tool' That tool is doing absolutly nothing from what I can tell. So is there a way to m...

Serializing a dataset to a strongly type business object property

In a vb .net winforms app I am trying out something for "wide and shallow" children of a record. I use strongly typed business objects ( Strataframe ). My plan is to have a number of "child tables" collected in a dataset I drop on the form. they have no correspondence in persisted data, so the dataset is untyped and I am creating th...

Add a record to relational XML with C#

I have a XML and XSD I want to add a record to trck table with Dataset i'm also write that code but need trackListrow... how can i handle that? playListDS rec = new playListDS(); if(File.Exists(Server.MapPath("~/playlist.xml"))) rec.ReadXml(Server.MapPath("~/playlist.xml")); int id = int.Parse(r...

Is it possible and safe to have multiple TDataSources reffering one TDataSet descendant component ?

Hi there! I'm designing database app with ZeosLib. On one form I have some Lookups that should refer to the same dataset. Is it safe to create one TDataSet descendant and then connect few TDataSources to it ? ...

Saving nested XML in C#

I've go the following XML file... <A> <B> <C>ValueX</C> <D>ValueY</D> </B> </A> Which I read into a DataSet to display it in a DataGridView. DataSet ds = new DataSet(); DataTable t = new DataTable("B"); ds.Tables.Add(t); t.Columns.Add("C", typeof(string)); t.Columns.Add("D", typeof(string)); // bind to DataGridView ds.Rea...

C# Update and Delete row table using tableAdapter, mdb access, dataGridView

I have a DataGridView, which loads data from mdb Access table The grid only shows data (is readonly). I have a button for inserting new row, and now have to make two more buttons, one for update and one for delete The following code works fine for inserting a new row this.estacionamientoTableAdapter.Insert(tb1.Text, tb2.Text, tb3.Tex...

.NET DataSet query efficiency

I've got a xml that I'm parsing and trying to extract some data from. Let's say the resulting dataset, after parsing an input xml file, has (2) Tables. Table #1 contains an IP Address and a primary key. Table #2 contains port numbers and a matching primary key. I want to go through both tables and generate an object that contains an I...

Is there a PHP library to create ASP.Net datasets for use with ASP.Net webservices?

I need to consume a ASP.Net webserice from PHP. So far reading data hasn't been to difficult. I have been able to pars the XML and find the information that I need. The problem I am running into is sending data back to the webservice. It is looking for the XML representation of a dataset. Is there anything out there that can generate the...

where can I find graph input resources/files?

Hi! I want to test various algorithms on graphs. Does anyone know a web where I can get lots of examples in text files? I've found many examples but they are always images. I want a text description of a graph, by edge listing or whatever... do you know one such source? Thanks! Manuel ...

DataSet StoreProcedure Table names

Hi, I am calling a stored procedure to return two tables. I am getting it as a dataset in my console application. The table names in the dataset are something like TABLE,TABLE1. Is there anyway to change this to a meaningful names from stored procedure?? Thanks, Mahesh ...

What would be the best practice to store multiple 2 digit dataset in MySql server

Let say i want to store several dataset ie 78 94 33 22 14 55 18 10 11 44 59 69 79 39 49 29 19 39 And later on i would like to be able run queries that will determine the frequency of certain number. What would be the best way to this? What would be table structure to make a fast query. Please be specific as you can be. ...

C#: Bind XML to ComboBox via DataSet

Hello guys, I am trying to get this code work for about 2 hours =( I am new to C# and don't know all the .NET library classes. The target is to populate XML data to comboBox DataSet dataSet = new DataSet(); DataTable dataTable = new DataTable("table1"); dataTable.Columns.Add("col1", typeof(string)); dataSet.Tables.Add(dataTable); Str...

Dataset - duplicate values when setting primary key

I have a dataset with a column "person_code". This column contains the following data: "Carra" "Carra " -> one trailing space Now if i set the primary key of the dataset to the column "person_code" I'll get the following error: "These columns don't currently have unique values." Any way around this? The best I can think of is to a...