Re: Weird problem in dataset - Bug?
From: Babu Mannaravalappil (babupalladium1_at_yahoo.com)
Date: 09/30/04
- Next message: Plausible Indirection: "meaning of max pool size ?"
- Previous message: Plausible Indirection: "Re: Informix+ODBC+ADO.NET - problem"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 30 Sep 2004 12:49:21 -0400
Thanks for the reply JT. No, the datatype is not Unsigned, it is decimal.
The weird part is, I have other columns of the same type and same data going
in and out. The problem happens only on the ParentCategoryId column.
Since I could not fix it, I simply changed the name of the column from
"ParentCategoryId" to "ParentId" (all other characteristics of this column
including the datatype remains the same) both in the Database table and the
Dataset table. Now everything is working fine.
But I would still like to know, why it did not work when the name of the
column was ParentCategoryId.
Babu.
"Babu Mannaravalappil" <babupalladium1@yahoo.com> wrote in message
news:eAQnyokpEHA.536@TK2MSFTNGP11.phx.gbl...
> Hi all,
>
> Visual Studio Enterprise 2003 and DotNet Framework 1.1.
>
> I have a strongly typed dataset (generated by the Schema Designer). This
> dataset has a table called Category and one of the columns in this table
> is called "ParentCategoryId". There are no explicit relationship set
> between this column and any other column.
>
> Here are some non-contiguous lines of code:
>
> MainDS.CategoriesRow r = ds.Categories.NewCategoriesRow(); //create a
> detached row
> r.ParentCategoryId = -1; // set the ParentCategoryId....this is the
> problem column
> r.CreatedBy = -1; // set the CreatedBy.....this column is
> perfectly OK.
> ds.Categories.AddCategoriesRow(r); // Add the row to the table.
>
> The problem is when the AddCategoriesRow(r) method is executed, the the
> value in ParentCateogyId immediately changes to 1 instead of -1. This
> only happens if the value in this column happens to be equal to or less
> than zero. Any value < 0 is changed to 1. As long as the value is > 0,
> everything works as expected. The "CreatedBy" column is identical in
> characteristics to "ParentCategoryId" column. The above problem does not
> occur in CreatedBy column. Whatever value I assign to CreatedBy stays put.
> But not in ParentCategoyId column. I have tried every trick in the book
> to no avail. I even deleted the table from the schema and re-added the
> same to force a recompile of the XSD file. The only conclusion I can come
> to is that there must be some bug in the framework or the column name
> ParentCategoryId is used internally in ADO.NET which is causing some name
> conflict or something.
>
> Has anybody ever seen this problem before? Any help is highly
> appreciated.
>
> Babu.
>
>
- Next message: Plausible Indirection: "meaning of max pool size ?"
- Previous message: Plausible Indirection: "Re: Informix+ODBC+ADO.NET - problem"
- Messages sorted by: [ date ] [ thread ]