locked
Why I cannot change the datatype of a column of a empty table? RRS feed

  • Question

  • Hello

    I made a call to the Clear() method of Dataset before trying to change the datatype of a given column of a DataTable inside that Dataset. When doing so, an error is raised stating that I cannot change the datatype of a column once it has data. What could be happening?

    Thanks a lot
    Thursday, June 11, 2009 5:41 AM

Answers

  • This seems like a bug to me, but in order for us to figure this out I would need more information. Can you call myTable.Rows.Count and print this out to the console to see if there is any data in it?

    There is another option as well. You could call DataTable.Clone, this will clone the schema of the table but not the data. Then you could change the datatype and this would likely work. Another option is to call DataTable.Clear() directly.

    If this any of these still don't work, could you call myTable.WriteXml and write this all to a file and then read it back into a different DataTable. Then try to change the type again. If this fails then we have successfully identified a bug, you can then post the xsd or send it to me over email or something like that.

    Thanks
    Chris Robinson
    Program manager - DataSet


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, June 12, 2009 4:16 AM

All replies

  • Can you include the specific error that you are running into, this seems odd that its failing. What type do you have it set to and what are you changing it to? If you wouldn't mind putting a simple repro into code I can look at this in more detail.

    Are you sure you are clearing the right table, and not a different one?

    Thanks,
    Chris Robinson
    Program Manager - DataSet
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, June 11, 2009 1:57 PM
  • The error text is "Cannot change DataType of a column once it has data." and I am changing from Int32 to Int64. I am calling then DataSet.Clear() method, which suposedly clear the rows of all the tables.

    myTable.DataSet.Clear()
    myTable.Columns("Col1").DataType = Type.GetType("System.Int64")


    Thanks.

    Thursday, June 11, 2009 11:58 PM
  • This seems like a bug to me, but in order for us to figure this out I would need more information. Can you call myTable.Rows.Count and print this out to the console to see if there is any data in it?

    There is another option as well. You could call DataTable.Clone, this will clone the schema of the table but not the data. Then you could change the datatype and this would likely work. Another option is to call DataTable.Clear() directly.

    If this any of these still don't work, could you call myTable.WriteXml and write this all to a file and then read it back into a different DataTable. Then try to change the type again. If this fails then we have successfully identified a bug, you can then post the xsd or send it to me over email or something like that.

    Thanks
    Chris Robinson
    Program manager - DataSet


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, June 12, 2009 4:16 AM
  • Hi Chris,

    I have the same problem, but in the designer: when I try to change the datatype of some columns from int32 to double the designer complains.
    I can work around it easily by removing the fields and then adding them with the correct datatype, but this may help you to pinpoint the bug.

    The fields that I'm trying to change are ProposalToQualified, QualifiedToOffer, OfferToSales and ProposalToSales in the Conversionrate data table.

    This is my about box's content:

    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    Version 3.5 SP1

    Installed Edition: Professional

    Microsoft Visual Basic 2008   91605-270-5511162-60751
    Microsoft Visual Basic 2008

    Microsoft Visual C# 2008   91605-270-5511162-60751
    Microsoft Visual C# 2008

    Microsoft Visual C++ 2008   91605-270-5511162-60751
    Microsoft Visual C++ 2008

    Microsoft Visual Studio 2008 Tools for Office   91605-270-5511162-60751
    Microsoft Visual Studio 2008 Tools for Office

    Microsoft Visual Studio Tools for Applications 2.0   91605-270-5511162-60751
    Microsoft Visual Studio Tools for Applications 2.0

    Microsoft Visual Web Developer 2008   91605-270-5511162-60751
    Microsoft Visual Web Developer 2008

    CodeRush for Visual Studio   9.2

    CodeRush Xpress   9.2

    Crystal Reports    AAJ60-G0MSA4K-68000CF
    Crystal Reports Basic for Visual Studio 2008


    DXCore for Visual Studio   9.2
    DXCore for Visual Studio

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB944899)   KB944899
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/944899.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947171)   KB947171
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947171.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947180)   KB947180
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947180.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB948127)   KB948127
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/948127.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB953256)   KB953256
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/953256.

    Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB971092)   KB971092
    This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/971092.

    Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB945282)   KB945282
    This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/945282.

    Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946040)   KB946040
    This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946040.

    Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946308)   KB946308
    This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946308.

    Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946344)   KB946344
    This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946344.

    Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB946581)   KB946581
    This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/946581.

    Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947173)   KB947173
    This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947173.

    Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947540)   KB947540
    This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947540.

    Hotfix for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU (KB947789)   KB947789
    This hotfix is for Microsoft Visual Studio 2008 Shell (integrated mode) - ENU.
    If you later install a more recent service pack, this hotfix will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947789.

    Microsoft Recipe Framework Package   8.0
    This package provides services to the guidance packages.

    Microsoft Visual Studio 2008 Professional Edition - ENU Service Pack 1 (KB945140)   KB945140
    This service pack is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/945140.

    Microsoft Visual Studio 2008 Professional Edition - ENU Service Pack 1 (KB947888)   KB947888
    This service pack is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this service pack will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/947888.

    PowerCommands for Visual Studio 2008   1.0
    A set of power commands for Visual Studio 2008

    Refactor! for Visual Studio   9.2
    Refactor! for Visual Studio

    Security Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB973675)   KB973675
    This security update is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this security update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/973675.

    SQL Server Analysis Services  
    Microsoft SQL Server Analysis Services Designer
    Version 10.0.2531.0

    SQL Server Integration Services  
    Microsoft SQL Server Integration Services Designer
    Version 10.0.2531.0 ((Katmai_PCU_Main).090329-1015 )

    SQL Server Reporting Services  
    Microsoft SQL Server Reporting Services Designers
    Version 10.0.2531.0

    Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB956453)   KB956453
    This update is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/956453.

    Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB967143)   KB967143
    This update is for Microsoft Visual Studio 2008 Professional Edition - ENU.
    If you later install a more recent service pack, this update will be uninstalled automatically.
    For more information, visit http://support.microsoft.com/kb/967143.

    Visual Studio Package Load Analyzer   1.0
    A utility that analyzes package load failures in Visual Studio.

    Web Service Software Factory   1.0
    Information about Web Service Software Factory


    Here you have the xsd:

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="ReportsDataSet" targetNamespace="http://tempuri.org/ReportsDataSet.xsd" xmlns:mstns="http://tempuri.org/ReportsDataSet.xsd" xmlns="http://tempuri.org/ReportsDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
      <xs:annotation>
        <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
          <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
            <Connections>
              <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="FlexConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="FlexConnectionString (Settings)" PropertyReference="ApplicationSettings.FlexCRM.CrmDAL.Interface.Properties.Settings.GlobalReference.Default.FlexConnectionString" Provider="System.Data.Odbc" />
            </Connections>
            <Tables />
            <Sources />
          </DataSource>
        </xs:appinfo>
      </xs:annotation>
      <xs:element name="ReportsDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="ReportsDataSet" msprop:Generator_DataSetName="ReportsDataSet" msprop:EnableTableAdapterManager="true">
        <xs:complexType>
          <xs:choice minOccurs="0" maxOccurs="unbounded">
            <xs:element name="OfferHistory" msprop:Generator_UserTableName="OfferHistory" msprop:Generator_RowDeletedName="OfferHistoryRowDeleted" msprop:Generator_RowChangedName="OfferHistoryRowChanged" msprop:Generator_RowClassName="OfferHistoryRow" msprop:Generator_RowChangingName="OfferHistoryRowChanging" msprop:Generator_RowEvArgName="OfferHistoryRowChangeEvent" msprop:Generator_RowEvHandlerName="OfferHistoryRowChangeEventHandler" msprop:Generator_TableClassName="OfferHistoryDataTable" msprop:Generator_TableVarName="tableOfferHistory" msprop:Generator_RowDeletingName="OfferHistoryRowDeleting" msprop:Generator_TablePropName="OfferHistory">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DealerID" msprop:Generator_UserColumnName="DealerID" msprop:Generator_ColumnVarNameInTable="columnDealerID" msprop:Generator_ColumnPropNameInRow="DealerID" msprop:Generator_ColumnPropNameInTable="DealerIDColumn" type="xs:int" />
                  <xs:element name="OfferHistoryID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="OfferHistoryID" msprop:Generator_ColumnVarNameInTable="columnOfferHistoryID" msprop:Generator_ColumnPropNameInRow="OfferHistoryID" msprop:Generator_ColumnPropNameInTable="OfferHistoryIDColumn" type="xs:int" />
                  <xs:element name="OfferID" msprop:Generator_UserColumnName="OfferID" msprop:Generator_ColumnVarNameInTable="columnOfferID" msprop:Generator_ColumnPropNameInRow="OfferID" msprop:Generator_ColumnPropNameInTable="OfferIDColumn" type="xs:int" minOccurs="0" />
                  <xs:element name="NrOfCars" msprop:Generator_UserColumnName="NrOfCars" msprop:Generator_ColumnVarNameInTable="columnNrOfCars" msprop:Generator_ColumnPropNameInRow="NrOfCars" msprop:Generator_ColumnPropNameInTable="NrOfCarsColumn" type="xs:int" minOccurs="0" />
                  <xs:element name="ModelID" msprop:Generator_UserColumnName="ModelID" msprop:Generator_ColumnVarNameInTable="columnModelID" msprop:Generator_ColumnPropNameInRow="ModelID" msprop:Generator_ColumnPropNameInTable="ModelIDColumn" type="xs:int" minOccurs="0" />
                  <xs:element name="Purchasemethod" msprop:Generator_UserColumnName="Purchasemethod" msprop:Generator_ColumnVarNameInTable="columnPurchasemethod" msprop:Generator_ColumnPropNameInRow="Purchasemethod" msprop:Generator_ColumnPropNameInTable="PurchasemethodColumn" type="xs:int" minOccurs="0" />
                  <xs:element name="SalesprocessID" msprop:Generator_UserColumnName="SalesprocessID" msprop:Generator_ColumnVarNameInTable="columnSalesprocessID" msprop:Generator_ColumnPropNameInRow="SalesprocessID" msprop:Generator_ColumnPropNameInTable="SalesprocessIDColumn" type="xs:int" minOccurs="0" />
                  <xs:element name="DateChanged" msprop:Generator_UserColumnName="DateChanged" msprop:Generator_ColumnVarNameInTable="columnDateChanged" msprop:Generator_ColumnPropNameInRow="DateChanged" msprop:Generator_ColumnPropNameInTable="DateChangedColumn" type="xs:dateTime" minOccurs="0" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="CompanyHistory" msprop:Generator_UserTableName="CompanyHistory" msprop:Generator_RowDeletedName="CompanyHistoryRowDeleted" msprop:Generator_RowChangedName="CompanyHistoryRowChanged" msprop:Generator_RowClassName="CompanyHistoryRow" msprop:Generator_RowChangingName="CompanyHistoryRowChanging" msprop:Generator_RowEvArgName="CompanyHistoryRowChangeEvent" msprop:Generator_RowEvHandlerName="CompanyHistoryRowChangeEventHandler" msprop:Generator_TableClassName="CompanyHistoryDataTable" msprop:Generator_TableVarName="tableCompanyHistory" msprop:Generator_RowDeletingName="CompanyHistoryRowDeleting" msprop:Generator_TablePropName="CompanyHistory">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DealerID" msprop:Generator_UserColumnName="DealerID" msprop:Generator_ColumnVarNameInTable="columnDealerID" msprop:Generator_ColumnPropNameInRow="DealerID" msprop:Generator_ColumnPropNameInTable="DealerIDColumn" type="xs:int" />
                  <xs:element name="CompanyPhaseHistoryID" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="CompanyPhaseHistoryID" msprop:Generator_ColumnPropNameInRow="CompanyPhaseHistoryID" msprop:Generator_ColumnVarNameInTable="columnCompanyPhaseHistoryID" msprop:Generator_ColumnPropNameInTable="CompanyPhaseHistoryIDColumn" type="xs:int" />
                  <xs:element name="CompanyPhaseID" msprop:Generator_UserColumnName="CompanyPhaseID" msprop:Generator_ColumnPropNameInRow="CompanyPhaseID" msprop:Generator_ColumnVarNameInTable="columnCompanyPhaseID" msprop:Generator_ColumnPropNameInTable="CompanyPhaseIDColumn" type="xs:int" minOccurs="0" />
                  <xs:element name="CompanyID" msprop:Generator_UserColumnName="CompanyID" msprop:Generator_ColumnPropNameInRow="CompanyID" msprop:Generator_ColumnVarNameInTable="columnCompanyID" msprop:Generator_ColumnPropNameInTable="CompanyIDColumn" type="xs:int" minOccurs="0" />
                  <xs:element name="DateChanged" msprop:Generator_UserColumnName="DateChanged" msprop:Generator_ColumnPropNameInRow="DateChanged" msprop:Generator_ColumnVarNameInTable="columnDateChanged" msprop:Generator_ColumnPropNameInTable="DateChangedColumn" type="xs:dateTime" minOccurs="0" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Conversionrate" msprop:Generator_UserTableName="Conversionrate" msprop:Generator_RowDeletedName="ConversionrateRowDeleted" msprop:Generator_TableClassName="ConversionrateDataTable" msprop:Generator_RowChangedName="ConversionrateRowChanged" msprop:Generator_RowClassName="ConversionrateRow" msprop:Generator_RowChangingName="ConversionrateRowChanging" msprop:Generator_RowEvArgName="ConversionrateRowChangeEvent" msprop:Generator_RowEvHandlerName="ConversionrateRowChangeEventHandler" msprop:Generator_TablePropName="Conversionrate" msprop:Generator_TableVarName="tableConversionrate" msprop:Generator_RowDeletingName="ConversionrateRowDeleting">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="Date" msprop:Generator_UserColumnName="Date" msprop:Generator_ColumnPropNameInRow="Date" msprop:Generator_ColumnVarNameInTable="columnDate" msprop:Generator_ColumnPropNameInTable="DateColumn" type="xs:dateTime" />
                  <xs:element name="ProposalNew" msprop:Generator_UserColumnName="ProposalNew" msprop:Generator_ColumnPropNameInRow="ProposalNew" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnProposalNew" msprop:Generator_ColumnPropNameInTable="ProposalNewColumn" type="xs:int" default="0" />
                  <xs:element name="ProposalCurrent" msprop:Generator_UserColumnName="ProposalCurrent" msprop:Generator_ColumnPropNameInRow="ProposalCurrent" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnProposalCurrent" msprop:Generator_ColumnPropNameInTable="ProposalCurrentColumn" type="xs:int" default="0" />
                  <xs:element name="QualifiedNew" msprop:Generator_UserColumnName="QualifiedNew" msprop:Generator_ColumnPropNameInRow="QualifiedNew" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnQualifiedNew" msprop:Generator_ColumnPropNameInTable="QualifiedNewColumn" type="xs:int" default="0" />
                  <xs:element name="QualifiedCurrent" msprop:Generator_UserColumnName="QualifiedCurrent" msprop:Generator_ColumnPropNameInRow="QualifiedCurrent" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnQualifiedCurrent" msprop:Generator_ColumnPropNameInTable="QualifiedCurrentColumn" type="xs:int" default="0" />
                  <xs:element name="OfferNew" msprop:Generator_UserColumnName="OfferNew" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnOfferNew" msprop:Generator_ColumnPropNameInTable="OfferNewColumn" msprop:Generator_ColumnPropNameInRow="OfferNew" type="xs:int" default="0" />
                  <xs:element name="OfferCurrent" msprop:Generator_UserColumnName="OfferCurrent" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnOfferCurrent" msprop:Generator_ColumnPropNameInTable="OfferCurrentColumn" msprop:Generator_ColumnPropNameInRow="OfferCurrent" type="xs:int" default="0" />
                  <xs:element name="SalesNew" msprop:Generator_UserColumnName="SalesNew" msprop:Generator_ColumnPropNameInRow="SalesNew" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnSalesNew" msprop:Generator_ColumnPropNameInTable="SalesNewColumn" type="xs:int" default="0" />
                  <xs:element name="SalesCurrent" msprop:Generator_UserColumnName="SalesCurrent" msprop:Generator_ColumnPropNameInRow="SalesCurrent" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnSalesCurrent" msprop:Generator_ColumnPropNameInTable="SalesCurrentColumn" type="xs:int" default="0" />
                  <xs:element name="DeliveriesNew" msprop:Generator_UserColumnName="DeliveriesNew" msprop:Generator_ColumnPropNameInRow="DeliveriesNew" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnDeliveriesNew" msprop:Generator_ColumnPropNameInTable="DeliveriesNewColumn" type="xs:int" default="0" />
                  <xs:element name="DeliveriesCurrent" msprop:Generator_UserColumnName="DeliveriesCurrent" msprop:Generator_ColumnPropNameInRow="DeliveriesCurrent" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnDeliveriesCurrent" msprop:Generator_ColumnPropNameInTable="DeliveriesCurrentColumn" type="xs:int" default="0" />
                  <xs:element name="ProposalToQualified" msprop:Generator_UserColumnName="ProposalToQualified" msprop:Generator_ColumnPropNameInRow="ProposalToQualified" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnProposalToQualified" msprop:Generator_ColumnPropNameInTable="ProposalToQualifiedColumn" type="xs:int" default="0" />
                  <xs:element name="QualifiedToOffer" msprop:Generator_UserColumnName="QualifiedToOffer" msprop:Generator_ColumnPropNameInRow="QualifiedToOffer" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnQualifiedToOffer" msprop:Generator_ColumnPropNameInTable="QualifiedToOfferColumn" type="xs:int" default="0" />
                  <xs:element name="OfferToSales" msprop:Generator_UserColumnName="OfferToSales" msprop:Generator_ColumnPropNameInRow="OfferToSales" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnOfferToSales" msprop:Generator_ColumnPropNameInTable="OfferToSalesColumn" type="xs:int" default="0" />
                  <xs:element name="ProposalToSales" msprop:Generator_UserColumnName="ProposalToSales" msprop:Generator_ColumnPropNameInRow="ProposalToSales" msprop:nullValue="0" msprop:Generator_ColumnVarNameInTable="columnProposalToSales" msprop:Generator_ColumnPropNameInTable="ProposalToSalesColumn" type="xs:int" default="0" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:choice>
        </xs:complexType>
        <xs:unique name="Constraint1" msdata:PrimaryKey="true">
          <xs:selector xpath=".//mstns:OfferHistory" />
          <xs:field xpath="mstns:DealerID" />
          <xs:field xpath="mstns:OfferHistoryID" />
        </xs:unique>
        <xs:unique name="CompanyHistory_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
          <xs:selector xpath=".//mstns:CompanyHistory" />
          <xs:field xpath="mstns:DealerID" />
          <xs:field xpath="mstns:CompanyPhaseHistoryID" />
        </xs:unique>
        <xs:unique name="Conversionrate_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
          <xs:selector xpath=".//mstns:Conversionrate" />
          <xs:field xpath="mstns:Date" />
        </xs:unique>
      </xs:element>
    </xs:schema>



    Best regards,
    Gaston Verelst

    Friday, September 25, 2009 7:19 AM