Dave Burke : Freelance .NET Web Developer specializing in Online Communities

ADO.NET 2.0 Primary key bug in AddMyTableRow() method

Beware if you're using DataSets in ADO.NET 2.0 and the new AddMyTableRow() method with the SQLDataTableAdapter.  In your relationships, you may want to consider using NON-primary keys.  In the example below, for instance, select non-key fields for your DataTable in the DataSet Designer.  I don't know if this is an official bug with Beta 2.0, but I do know that my query was perfect, the datatable was perfect, but the primary key field was not visible in the AddMyTableRow() field argument list.  When I went back and added the non-primary key field from the relationship instead, all field arguments were displayed as you would expect.  That was such a weird bug!  Kicked my butt for a good hour this morning. 

Comments (0) | Post RSS RSS comment feed

Posted on 7/12/2005 7:07:00 PM by Dave Burke
Categories: .NET
Tags:

Related posts


Powered by BlogEngine.NET 2.0.0.36
Theme by Dave Burke