strongly-typed-dataset

Adding dummy Column to strongly typed dataset

I am writing a site that uses strongly typed datasets. The DBA who created the table made gave a column a value that represents a negative. The column is 'Do_Not_Estimate_Flag' where the column can contain 'T' or 'F'. I can't change the underlying table or the logic that fills it. What I want to do is to add a 'ESTIMATION_ALLOWED' colu...

How to migrate from MS Access to SQL server 2005

I have a VB.NET windows application that pulls information from an MS Access database. The primary role of the application is to extract information from Excel files in various formats, standarize the file layout and write that out to csv files. The application uses MS Access as the source for the keys and cross reference files. The w...

ParentRelations don't work in generated DataSets?

I created two tables: Publisher PK, PublisherId, int, not null, indentity +1 PublisherName, varchar(50), not null Product PK, ProductId, int, not null, identity +1 ProductName, varchar(50), not null PublisherId, int, not null Then I created a foreign key constraint FK__Product__Publisher between those tables connecting the Pub...

Calling Oracle SP with TableAdapter very slow

I have a query that runs super fast when executed in the sql editor (oracle): 1ms. The same query (as stored procedure) when executed by a DataSet-TableAdapter takes 2 seconds. I'm just retrieving 20rows. Since I'm using a TableAdapter, the return values are stored in a ref cursor. If I was fetching 2'000 rows I could understand that ...

Typed dataset not updating on column addition

I have a datagridview that I'm using in Visual Studio 2008 for a winforms app. The datagridview is bound to a typed dataset. I added a few columns to the table referenced from the typed dataset. So, i open the typed dataset and reconfigured the datatable to show the new columns. When I do a preview, the columns are there. However, when i...

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 ...

Last inserted record ID problems using typed DataSet and DataGridView

Hi. I'm using following for a simple database application: SQL Server Compact Edition .sdf file as database, with int primary key IDs. Typed DataSet and BindingSource as data access layer DataGridView for displaying data. My problem is, I'm having trouble with the last inserted record/row ID. When I add a row to datagridview, using A...

How do you filter a TableAdapter's FillBy based on two tables?

I'm using VS2008 C# Express and the Northwind database on a Windows Form application. I used drag and drop to set up the master details binding (I used the Orders and Order Details) for the two datagridviews. At this point, everything works as expected. So as not to return every row in the table, I want to filter the Orders table ba...

Does anyone use typed DataSets in .NET?

I have once tried to use typed DateSets in a relatively small production application. Initially it looked like a pretty good idea, but turned out to be different. It was pretty fine for some basic tasks, but as soon as something more advanced was required, it's limitations kicked in and it failed miserably. Luckily the project got cancel...

C# Reflection: Getting the fields of a DataRow from a Typed DataSet

I am currently building a method that takes an object that is of type DataRow from a typed DataSet, and then returning a string in JSON format of the fields in the DataRow (for use in a Web Service). By using System.Reflection, I am doing something like this : public string getJson(DataRow r) { Type controlType = r.GetType...

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'...

Modifying the Data Source for the Strongly Typed Dataset connection string

Here are two questions related to modifying the data source for strongly typed dataset connection string. When my app is deployed, a light weight database ( in the form of Microsoft Access) is deployed to the Application Data folder. I have a strongly typed dataset that is wrapped around that. So the question is how to change the follow...

Should I distribute the Dataset XSD files when I deploy as website?

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! ...

Strongly Typed DataSet with a set of TableAdapters per database provider?

I want a strongly-typed DataSet along with designer TableAdapters, but Visual Studio's DataSet designer generates provider-specific (e.g. SQL Server vs. MySql) code and I don't want to commit to just one provider. An ORM would help, but: Entity Framework is 3.5 only and doesn't play nice with DataSets, and NHibernate doesn't support S...

Empty BindingSource problem

I have a problem with binding data using BindingSource, typed dataset and DataGridView. My problem is: BindingSource, therefore grid, is empty after binding data (bindingSource.Count is 0). I couldn't figure out what I'm doing wrong and I'd be very happy if anyone could help me with this. My application structure is like this: I have two...

How to use Strongly Typed dataset designer to configure multiple updates?

I am using strongly-typed-dataset as an ORM to wrap around my Microsoft Access database, now I am looking for a way to create an equivalent of UPDATE table1 SET table1.nationality = 'england' WHERE table1.nationality in ( select table2.nationality from table2 where table2.gender ='M' ); in a strongly typed dataset designer, but not...

Do Strongly Typed Datasets improve performance?

Where I work we're finally coming around to the idea of using strongly typed datasets to encapsulate some of our queries to sqlserver. One of the idea's I've been touting is the strength of the strongly typed column's, mainly for not needing to cast any data. Am I wrong in thinking that strongly-typed-datasets would improve performance ...

How can I enforce the use of factory methods on a strongly typed DataSet?

Without breaking the VS2008 designer, can I set my DataTable.New*Row methods internal while leaving the overall DataSet and its tables and classes public? I'm using the VS2008 designer to create an ADO.NET strongly typed DataSet for my application. Some columns refer to external tables. I'd like to check those references at creation ti...

HTML helpers throw exception on accessing property when dbnull

Hi, I just upgraded my project to ASP.net MVC RC. The bad thing is HTML helpers are throwing exceptions from the dataset even when I pass a new datarow. Error is as a result of conversion to dbnull from .net object types. This exceptions occurs on my UI. I do check for DBnull on update but not when binding. MVC beta wasn't behaving as ...

Transactions with typed dataset and Sql Server CE

I have a WinForms application that interacts with a SqlCe local database. I manage db operations using BindingSources, TableAdapters and typed datasets.I have several operations scattered through several methods in two different classes that I need to perform in a transaction and I was thinking of using System.Transactions.Transaction or...