dataset

Getting a DataSet from an SQL Express Server C#

How can I get a DataSet with all the data from a SQL Express server using C#? Thanks edit: To clarify, I do want all the data from every table. The reason for this, is that it is a relatively small database. Previously I'd been storing all three tables in an XML file using DataSet's abilities. However, I want to migrate it to a databas...

Does LINQ use DataRelations to optimize joins?

I can't find the answer to this anywhere, and before I start pawing through generated code with Reflector I thought it'd be worth asking: Suppose I have the following LINQ query run against DataTables in a DataSet: var list = from pr in parentTable.AsEnumerable() join cr in childTable.AsEnumerable() on cr.Field<int>("ParentID") ...

How can I add non-column specific parameters to a C# table adapter?

I'm using a TableAdapter for the first time and adding a custom query to it, and I'm getting stuck on adding some search parameters to my query, here's what I've got: SELECT * FROM Orders WHERE (id_order = @id_order) OR (IsFor LIKE '%@word1%') OR (IsFor LIKE '%@word2%') OR (IsFrom LIKE '%@word1%') OR ...

Lost XML file declaration using DataSet.WriteXml(Stream)

I had a Dataset with some data in it. When I tried to write this DataSet into a file, everything was OK. But When I tried to write it into a MemoryStream, the XML file declaration was lost. The code looks like: DataSet dSet = new DataSet(); //load schema, fill data in dSet.WriteXML("testFile.xml"); MemoryStream stream = new MemoryStream...

TClientDataset: 'Fieldtype not supported for XML.'

I've got a bunch of data loaded into a TClientDataset, representing an array of complex objects. But when I try to run Dataset.SaveToFile('c:\test.xml', dfXMLUTF8); it doesn't like it: Project testing.exe raised exception class EDBClient with message 'Fieldtype not supported for XML.'. This is a lot less useful than it should be, f...

Typed dataset not recognized when moved to another project

Hi- I moved a typed dataset from one project to an ASP Web Application project. I put the typed dataset into one of the existing directories as it was in the App_Code directory of the previous site but don't see the option to create that asp.net folder in this project. Now, when I try to instantiate the typed dataset, the compiler says ...

ASP.NET Datagrid HTML Output (Display)

Currently I am binding a dataset with a datagrid. ds = query.ExecuteReadQuery("select PollQuestionText as 'Survey Question', PollAnswer1Text as 'Selection 1', PollAnswer2Text as 'Selection 2', PollAnswer3Text as 'Selection 3', PollEnabled 'Status' from tbl_pollquestions") For Each row As Data.DataRow In ds.Tables(0).Rows ...

Get Table2 data from a relation to Table1 in C# Code

I have two tables in a DataSet where the ID field on each is the same. I have a Relation between the two tables. How do I, in C# code, pull the info from Table2 that relates to the info on Table1? I have tried using a new DataRow and assigning it by using GetChildRow, but for some reason I cannot seem to make it work. Also, I understan...

How To Change Schema of DataSet at Runtime C# ASP.Net

I would like to know how to change the schema of DataSet at Runtime ...

Is it possible to lock the ASP.net Dataset

I am having one requirement for locking the entire dataset. Is it possible to lock the ASP.net dataset that no further updates to dataset to be done. ...

Filtering on multiple DataTables in a DataSet

I have a DataSet containing multiple DataTables. I want to display information from the Product DataTable, which is the center table of the DataSet. But I want to be able to filter the DataSet on values from the surrounding tables. For example, I want to get all the Products that have a Feature (DataTable) named Width and have a Supplie...

DataSet.Locale what it does ?

Can someone plz tell me what's the Use of DataSet.Locale and can it be used to solve this issue. My Server is located in US and I am running a query against it. The Data contained in the table both at Remote Server(U.S) and Local are same. The Problem is when I am retrieving the DataSet using WebService from Remote Server. The Dates Co...

What costs more: DataSets or Multiple Updates?

Hello all, If my program was to hit the database with multiple updates would it be better to pull in the tables into a dataset, change the values and then send it back to the database. Does anyone know what's more expensive? ...

How can I limit DataSet.WriteXML output to typed columns?

I'm trying to store a lightly filtered copy of a database for offline reference, using ADO.NET DataSets. There are some columns I need not to take with me. So far, it looks like my options are: Put up with the columns Get unmaintainably clever about the way I SELECT rows for the DataSet Hack at the XML output to delete the columns I'...

Changing XSD ConnectionString at Runtime for a Multitenant app

Hello, I'm changing our application from "one set of code & one database" to "one set of code to multiple databases (one database per customer)". The original code is VS2005 ASP.NET(VB) & lots of XSD's in a separate DLL. The web.config's ConnectionString would override the one stored in the DLL at runtime. Now I need to change the Con...

Create SubSet of a dataSet ASP.Net

I have a dataset which is having some 28 columns Now I want to make another dataSet that will contain two dataTable having 14 columns in each table from the previous dataset. Help needed. ...

"Cannot resolve symbol" error in Visual Studio 2008?

I have started working on some code left behind by previous developers, and I'm having a strange issue with it. The code is C# in ASP.NET 2.0, and I'm using ReSharper 4.1 in Visual Studio 2008. This code compiles just fine and works in my Web app, but ReSharper is barfing on it with the message, "Cannot resolve symbol '<name of class he...

Is there a way to generate java classes from MS-Dataset XSD files?

Given a Dataset XSD file, is it possible to generate java classes, that don't make use of System.Data? I've tried running a test using JAXB's XJC tool, but it doesn't produce anything terribly useful. Update: I've tried XmlBeans also, following Fernando's suggestion, and it generates something similar to the XJC output - that is, class ...

VB.NET and Crystal Reports - datasets and more

I'm not sure if this is even possible but here goes: Currently I have a crystal report with a few header fields and detail lines ( of course) I pass a dataset containing a header datatable and a detail datatable. Everything works as expected... as long as I have only 1 record in the header table. What I would like to be able to do is so...

How do I handle a DBNull to Boolean conversion in my XSD DataSet?

In my database, I have a few columns in one of my tables that are bit (boolean) values. They are allowed to be NULL since the fields are not always going to contain data. I've gone through the process of creating an XSD DataSet using the table and made sure that the AllowDBNull field is set to True. However, when I pull a down record f...