Previously I've asked about inserting a column into a dataset. I now have a similar question...namely merging two or more columns into a single column.
Lets say I have the following data set:
DataSet ds = new DataSet();
ds.Tables.Add(new DataTable());
ds.Tables[0].Columns.Add("id", typeof(int));
ds.Tables[0].Columns.Add("firstname", ty...
In a .NET Datatable, the columns are Object types, which can include a datatable as a valid type for a column. So you can create a fairly complex structure:
CompanyID (Integer) | CompanyName (String) | OrderRecords (DataTable)
---------------------------------------------------------------------------
1 | Acme Corp. ...
Does it make sense to use .NET DataSets even in applications that use a local in-process database for application data persistence?
If DataSets are mainly meant for in-memory caching of database results, it sounds like they're not so beneficial when using something like SQL Server Compact local database that runs in the same process as ...
Hi,
1) I do a Dataset.WriteToXml(memory stream object)
2) Then i create a XMLDocument object
3) I then XMLDocument.Load (memory stream object)
I get a "XML Root namespace not found" exception.
Does the Dataset XML not include the required namespace ?
Thanks.
...
VS 2003 .NET 1.1
I know when I build a website into a DLL I do not have to distribute the cs files.
When my project includes strongly typed datasets built off an XSD file, should I also distribute the XSD file, or does the generated cs file (and thus the DLL) contain all the required information to use the Dataset?
Thanks!
...
hi,
I am a newbie to Database programming. After inserting a couple of rows into a DataSet object, I am trying to write back the updated DataSet to the Database but cannot figure out how to do it.
Can you give an example for the following please?
what SQL insert command to use if DataSet is already updated with new rows
Databinding e...
When retrieving values from a DataRow is it better to use the column name or column index?
The column name is more readable and easier to maintain:
int price = (int)dr["Price"];
While column index is just faster (I think):
int price = (int)dr[3];
Would using column names break if you decide to obfuscate the database?
...
I'm wondering how to add several data tables that I've built in code, to a blank MDB file that ships with my app.
I find it easy enough to connect to the MDB file via the OledbConnection object, but then I'm at a loss for an easy way to add my tables to it. There it sits...open...and empty, but what next?
I can add my tables to a datas...
Hi,
I am trying to create two tables in my SSRS report. I have used 2 different packages with same parameters for the dataset creation. while executing the dataset2 (manually from data tab in the designer) it works fine and gives me field results. But while executing from report (clicking the view report) the second table , which uses ...
I'm building a webservice which has a webmethod returning a Dataset object.
I'm having a problem XML tags are not written when its associated value is null.
A simplified example would be as follow:
ID Name Text
-- ------ -------------
1 NULL test1 <------- null value
2 toto test2
3 tata test3
...
As of now, I am thinking of keeping data in a DataSet in a WCF hosted service and other apps(on same box) can access the data via Named Pipes(exposed through WCF service). The apps then keep a copy of dataSet inside them so as to not re-fetch the data from the WCF unless it gets changed.
Is there a better way to achieve this ?
Some oth...
I am a graduate student of physics and I am working on writing some code to sort several hundred gigabytes of data and return slices of that data when I ask for it. Here is the trick, I know of no good method for sorting and searching data of this kind.
My data essentially consists of a large number of sets of numbers. These sets can co...
In a C# 2.0 I have a list of fields and a list of values (stored as strings), a table name, and an ODBC Connection.
I need to get the data types of the fields that are on that table, so I know how to generate my sql.
What's the best way to get that information from what I've got?
My only idea is to do a SELECT TOP 0 * FROM @TableNam...
I have used LINQ to SQL with a update stored procedure to update databases in the past. I wanted to know if there is anything similar in LINQ to Dataset
An example of the LINQ to SQL Update:
Dim lqUpdate = lqUpdate.sprocUpdate(ColumnName, NewValue, ID)
...
Problem: I have to pull data from a SQL Server database and an Oracle database and put it together in one dataset. The problem I have is: The SQL Server query requires an ID that is only found from the return of the Oracle query.
What I am wondering is: How can I approach this problem in a way such that performance is not harmed?
...
In the sample Delphi web service tutorials I've read, they tend to build a web service that returns a simple string or integer, e.g.
http://blogs.codegear.com/pawelglowacki/2008/12/18/38624
However, I read it's possible in .NET to build a web service that returns a DataSet or even an object. Is this possible in Delphi 2009, and if so w...
I am working on a DAL that is getting a DataReader Asynchronously.
I would like to write a single method for transforming the DataReader into a DataSet. It needs to handle different schema so that this one method will handle all of my fetch needs.
P.S. I am populating the SQLDataReader Asynchronously, please don't give answers that ...
I get a DataTable from a DataSet and then bind that DataTable to a DataGridView. Once the user edits the information on the DataGridView how do I take those changes and put them back into a DataTable that was used that I can then put back into my DataSet?
I want to make a Save Button on my DataGrid that when pressed actually saves the c...
Hi, further to these two questions, is there a way to disable the messages that may get sent along with the resultset in SQL2008?
(please note this is nothing to do with the ANSI_WARNINGS setting. Or NOCOUNT.)
Thanks for any help.
Edit: It's not a problem with compatibility settings or table owners. And it's nothing to do with NOCOUNT...
I am trying to take tables from one Access Database File, add them to another Access Database file with the exact same structure but with different information. I need to overwrite any existing tables. I am almost done with my project this is last my brick wall.
I am using a separate class file named DatabaseHandling.cs to work with the...