strongly-typed-dataset

Datasets. Why use the query adapter instead or table adapter?

Hi, Can someone tell me why I would use a query adapter within the dataset designer instead of adding queries to the table adapter? Regards ...

How can I use my own connection class with a strongly typed dataset?

I have designed a class with sqlClient.SqlCommand wrappers to implement such functionality as automatic retries on timeout, Async (thread safety), error logging, and some sql server functions like WhoAmI. I've used some strongly typed datasets mainly for display purposes only, but I'd like to have the same database functionality that I ...

Strongly Typed Datasets and CommandTimeouts

Preamble: So, over the past 5 years or so various applications and tools have been written here at my company. Unfortunately many of the people who developed these applications used strongly typed datasets, I'm considering outlawing them in our shop now... One of the larger processes that used strongly typed datasets is now timing out...

How can one easily set up sproc parameters in a strongly-named DataSet in Visual Studio 2005?

I don't usually work with this type of data layer so I'm not familiar with all the terminology and it's difficult to search for answers. I have an XSD file in Visual Studio 2005, and I'm looking at the GUI editor. I created a table adapter by dragging a stored procedure onto the form. That stored procedure is basically a SELECT stateme...

Pass current transaction or use DependentClone?

I have a WinForm application which uses SqlServer CE 3.5 as database. I use typed dataset queries for db operations. I need to use transactions for this operations. The problem is, they're scattered across different assemblies. My question is, what should I use to run all of them in a single transaction? Here's an example operation: //t...

How do you disallow DebuggerNonUserCodeAttribute from being placed on the code generated by the dataset designer?

Hey I would like to step thru dataset designer code in an ASP.NET project, how can i ensure that this: [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] is not included on the code it generates? ...

Using TransactionScope with typed dataset

I have a WinForm application querying SqlCe database using typed-dataset tabledapters. I have a main form assembly and a database assembly which handles every db operation. I'm having problems with updating using tableadapter in a transaction and I'd appreciate if anyone could give me any ideas why. Update() method gives this error: "...

How can I enforce security or permissions on a bound dataset?

Using a strongly typed dataset and its related table Adapters, normally when I want the changes to pass back, just pass it the table and let it do all the work. What are some easy ways to enforce security roles on the application user as to which fields they can insert/update/delete when the database is using an application ID instead ...

Nullable and typed dataset, is there a generator somewhere?

Trying to use a typed dataset with nullable fields... As been the case since the dawn of time, the typed dataset generator of visual studio does not support nullable types. Is there, somewhere in the net, a generator for a properly typed dataset? Thank you. ...

C# and Text file into a typed dataset

Is there any way to load a text file (edi, efi file) into a typed dataset? I thought you could do this using linq but have yet to figure how. Anyone have any suggestions? ...

How to serialize ObjectContext into XML like in DataSets (XML database)?

Hi In datasets there was a method WriteXml or ReadXml Does anyone have any idea on how to this with Entity Framework? Has anyone implemented this before? ...

Add partial class to TableAdapter

I use Visual Studio 2008, .NET 3.5 In my project I have a DataSet called SubCategory. In it is a SubCategoryTableAdapter, with some methods, added in designer with right click -> add query. I can use these methods on my page in a ObjectDataSource object. Now I would like to add my own method (for select) so that I could use it in Objec...

Strongly typed dataset wont fill, table mappings problem? c#.net 2.0

Hello all, You've been excellent with my other questions previously - so here I am again, in need of some help! I've got a query which joins three tables and a strongly typed dataset which has the columns defined for everything which comes back from the query. When I go to fill the dataadapter, nothing gets filled. I've copied the co...

Handcrafted Strongly Typed ADO.net DataTable - Can it be cleaner?

I have recently come across a very simple Typed DataTable (without using a .XSD)(I've lost author's URL so I can't credit him) but it looks like there's a lot of duplicated code (Such as the Add/Remove/GetNewRow methods). I've tried to push the repetitive methods into a super class, but I have issues due to the Employee needing to be g...

Using Enterprise Library Data Access Application Block with strongly typed data sets

I want my strongly typed data sets to be database agnostic. Is it possible to use Enterprise Library Data Access Application Block with strongly typed data sets? ...

Inserting Rows in Relationship using a Strongly Typed DataSet

I'm using ADO.NET with a strongly typed dataset in C# (.NET 3.5). I want to insert a new row to two tables which are related in an 1:n relation. The table Attachments holds the primary key part of the relation and the table LicenseAttachments holds the foreign key part. AttachmentsDataSet.InvoiceRow invoice; // Set to a valid row, also...

Typed DataSets in WebApplication Projects.

I am converting an older C# Website Project into a Web Application Project so that we can better manage it in our source control system. I have run into a problem. The Website Project used strongly-typed-datasets (i.e. .XSD files). There is C# code written that uses these strongly typed datasets as an object. That worked fine when it wa...

Casting generic datatable to typed datatable

I need to reuse a DataAccess method prescribed by client. This method returns a vanilla datatable. I want to cast this datatable to my Typed datatable. The amount of columns and their types will match. The exception message "Unable to cast object of type 'System.Data.DataTable' to type 'MarketValueDataTable'." is very clear, but how do ...

Prevent Typed DataSet updating PK column

I have a typed dataset, and where I call TableAdapter.Update(DataRow), the SQL executed includes an update of the primary key column of the database. Unfortunately, when this code runs on a replicated database, the PK column has the rowguid property set, and I get the following error: System.Data.SqlClient.SqlException: Updating col...

LINQ Query Returning No Value

Hi guys. I'm currently trying to run a LINQ query over a MS SQL database. This is what I have done. I can see the database, the table, and the data inside if i want to via the Server Explorer. I've created a new DataSet automatically from "Add new item..". I've then dragged the table from the server explorer into the designer view of...