none
Incorrect Data Type in MSDataset generated code RRS feed

  • Question

  • Hi

    I am using VS2008 and C#, .NET3.5 with an Access 2003 datasource.
    I have successfully created a dataset using the MSDatasetGenerator
    with several tables and custom queries.

    Everything is fine except for any custom update queries which I create on a table adapter.
    In all custom update queries double fields are typed as decimal fields
    in the method signature meaning I have to convert doubles to decimals in my code.

    The default update methods created at table adapter creation time have typed the fields
    correctly as doubles.

    Anyone else have this issue or know of a solution

    Thanks
    DL
    Monday, June 1, 2009 12:42 AM

Answers

  • Hi DL,

    I'm really sorry that this seems to be a bug. We will investigate more and hopefully get this fixed in next release.

    Currently, there are two ways to workaround this problem,
    1. Re-configure table adapter.
    On DataSet designer, right click this table adapter, and choose "Configure..." in the context menu. In Dialog "TableAdapter Configuration Wizard", keep all fields to default value, and click "Finish".
    2. Manually convert doubles to decimals in DataSet xml file.
    On Solution Explorer, right click DataSet and choose "Open With...", then select "XML Editor". In the opened xml file, manually replace doubles with decimals.

    Thanks!
    Jing Li

    • Proposed as answer by Jing Li Wednesday, June 3, 2009 1:39 AM
    • Marked as answer by Chris Robinson- MSFT Friday, August 21, 2009 4:49 PM
    Wednesday, June 3, 2009 1:39 AM

All replies

  • Hi DL,

    I'm really sorry that this seems to be a bug. We will investigate more and hopefully get this fixed in next release.

    Currently, there are two ways to workaround this problem,
    1. Re-configure table adapter.
    On DataSet designer, right click this table adapter, and choose "Configure..." in the context menu. In Dialog "TableAdapter Configuration Wizard", keep all fields to default value, and click "Finish".
    2. Manually convert doubles to decimals in DataSet xml file.
    On Solution Explorer, right click DataSet and choose "Open With...", then select "XML Editor". In the opened xml file, manually replace doubles with decimals.

    Thanks!
    Jing Li

    • Proposed as answer by Jing Li Wednesday, June 3, 2009 1:39 AM
    • Marked as answer by Chris Robinson- MSFT Friday, August 21, 2009 4:49 PM
    Wednesday, June 3, 2009 1:39 AM
  • Hi Jing Li

    Thanks

    regards
    DL
    Wednesday, June 3, 2009 7:19 AM