dataset

Aggregate a Dataset

How do i aggregate(using linq) the value of one column of a Dataset where the other column is the same. For example, my columns are Row1 Row2 2 3 4 5 6 7 2 2 6 4 7 4 2 4 I need something like this Row1 Row2 2 9 4 5 6 11 7 4 edit: the values in "Row2" are the number ...

Changing dataset connection string at runtime

I have a c# generated dataset. How can I change the connection string so I can use the dataset with another (identically structured yet differently populated) database? This has to occur at runtime as I do not know the server or database name at compile time. I am using c# 2.0. ...

c# unable to edit datarow in dataset

I'm trying to edit the data in a dataset (change the value in a column on one row), which is not linked to a database. I've been googling for about an hour with no results and no good examples out there. Hopefully someone can help me. My table (DataTable1) has these columns - ThreadID (string, PK), StatusText (string). I can select ...

Datasets for Apache Mahout

I am looking for datasets that can be used for implementing recommendation system usecase of Apache Mahout. I know of only MovieLens Data Sets from GroupLens Research group. Anyone knows any other datasets that can be used for recommendation system implementation? I am particularly interested in item-based data sets though other datase...

Update query not working in table adapter

I have a table adapter on which I want to query an update to my database. UPDATE Polls SET DateRequest = ? WHERE (Id = ?) But it's not working when I try to execute it _pollsAdapter.UpdatePollById(id, DateTime.Parse(RequestedDateBox.Text).ToOADate()); The adapter also has some other queries for selecting or inserting and they all w...

Crystal Report: Change ODBC connection to use dynamic dataset from csv file?

Hi All, The Problem: I currently have a few hundred crystal reports which get populated via an ODBC connection. I have to programmatically change this so I can populate a DataSet from a csv file and then populate a report based on the dataset. The main aim is to do this without actually modifying any of the reports (as that would mean...

How do you add a relationship in a dataset that contains three tables : e.g. users, roles and user_roles

My problem is like this : i got 3 tables : - users (user_id, name) - roles (role_id, role_name) - user_roles(user_id, role_id); I load them all in a dataset The challenge is to build a relation (or more?) in this dataset, that when given to a ultragrid (infragistics) they would display right - for each user his roles (name, descripti...

How to save new records inserted in a grids child band?

hi! the following snippet loads the data from three tables in two datasets and adds a relation between them : - users (user_id, name) - roles (role_id, role_name) - user_roles(user_id, role_id); into a Infragistics ultragrid. The data is siplayed in the grid, offering the posibility to add new rows. but here come the problem...how shoul...

Dynamic SQL on DataSet

I have to get a dynamically created SQL-Query to work with a DataSet. I'm using a DataSet where I store some information from the database file (MS-Access). Now I want the user to be able to select special filters - and depending on them I create a SQL-Query, e.g.: SELECT * FROM table WHERE x <> 0 AND y >= 10 The problem is, that the...

how to send DataSet object to client

how to send a serialized DataSet object from server to client using streams socket ...

Dataadapter and datasets issue

Hi all! I have the following situation - three tables in the db : - um_users (id, name) - um_roles (id, description) - um_user_roles (user_id, role_id) I load into a data set two datatables : the "users" one, and another one build on the other two, like this : _cmd = new OracleCommand("select * from um_users", _conn); _odaUsers ...

Linq to dataset select row based on max value of column

Hello, I have a dataset table, i want to group it by column "MOID", and then with in this group want to select the row which has max value of coulmn "radi" can anybody show me how to do it via LINQ to dataset ...

dynamicly move records in a dataset into a class is there a way to do it in c#?

assuming we use this on a table using "select * from table " ? i want to create an array of classes that use filed names (of the datatable) as class field names initalise them with the datatable fields is it possible ? if so please help :) soory for the spelling my writen english is not that good but i hope i was clear ...

Output large dataset from web service

Hi, I wonder if anyone experienced with returning large dataset from webservice. The dataset is around 10,000 x 60 floats. I will be using http wcf for my webservice. Any ideas to approach it are welcome :) Thanks. ...

How to convert DataSet Value to DataReader?

How to convert DataSet Value to DataReader? ...

Dataset column always returns -1

I have a SQL stored proc that returns a dataset to ASP.NET v3.5 dataset. One of the columns in the dataset is called Attend and is a nullable bit column in the SQL table. The SELECT for that column is this: CASE WHEN Attend IS NULL THEN -1 ELSE Attend END AS Attend When I execute the SP in Query Analyzer the row values are returned a...

Add all table names of my database to combo Box

public void show() { ds = new DataSet(); ada = new SqlDataAdapter("select * from sys.tables", conn); //ada = new SqlDataAdapter("select * from emp", conn); //ds = new DataSet(); ada.Fill(ds); } private void Form1_Load(object sender, EventArgs e) { conn = new SqlConnection(@"Data Sourc...

Visual Studio - Change datasource after initial database server is down?

Ok, so I've got this Visual Studio 2008 Project I was working with about a year ago perhaps. And this project had a datagrid that was linked to an external database running on a server off the internet. Now, this databinding was all done using Visual Studio 2008's built in features. But how can I now change the binding to a different se...

ODBC to SQL DATABASE using C# ADO.net

I have MYOB (AccountingSoftware) Database which I can read using ODBC. Now I have dataset containing all tables of MYOB database. What is best way that I can convert this Dataset into SQL Database. Where all tables are created automatically and data inserted automatically. ...

How should the database logic be stored in a website?

I'm new to web development and am making a mini project on a simple social networking site. I'm using ASP.NET with C# & SQL Server 2008 Express. I've read articles on how one should aim to create a data access layer (DAL) for the database to be used. One method is to create strongly typed datasets & adapters via the designer tools prov...