Toad World® Forums

Bug: MS SQL - Using Bit in Domain causes CHAR(1)?


#1

Hello,

I’m using TDM 3.5.5.5 Beta.

In my model I’m using domains. One domain represent a boolean, that should be a bit. The GUI shows the correct type.

But if I generate the DDL or a migration script, it create filed with CHAR(1) instead of BIT.

Any idea if I do something wrong, or if it’s a bug?
Is there any workaround?

The XML saved this:

    <PERDomainMS05 ObjectType="2006" CSAOName="PERDomainMS05">
        <Id>{0B09C3A8-A906-4FA4-9462-48950ED1E12B}</Id>
        <Name>Boolean</Name>
        <Ordinal>0</Ordinal>
        <GlobalOrder>0</GlobalOrder>
        <RNOffset>0</RNOffset>
        <RNLength>0</RNLength>
        <IgnoreNC>0</IgnoreNC>
        <Notes></Notes>
        <DataTypeParam1></DataTypeParam1>
        <DataTypeParam2></DataTypeParam2>
        <DefaultValue>0</DefaultValue>
        <Caption>Boolean</Caption>
        <DictType/>
        <DataType>
            <Id>{730E2F37-D9C2-4C81-A80C-61130ABAF2E0}</Id>
        </DataType>
        <UserDataType/>
        <Attributes>
            <Id>{79956419-7E95-4494-8567-257DC0A3B5F8}</Id>
            <Id>{5729A65B-57CB-412A-BFC7-F19BEC586654}</Id>
            <Id>{CBA66DC9-40AE-46EB-B811-F7425594AC26}</Id>
            <Id>{D6522186-010E-4682-95CE-68B92BAEA2A6}</Id>
            <Id>{4D3A9972-62B7-47E8-9FA2-69E50BB424D7}</Id>
            <Id>{D69E3631-CC9A-4DDC-B883-BC0C1023E790}</Id>
            <Id>{74885BCA-89BC-4569-BF0E-922853A1D27B}</Id>
            <Id>{5B1741B8-1C26-4311-97D7-68FC91013F48}</Id>
        </Attributes>
        <Default/>
        <CheckConstraints/>
        <ToDoItems/>
        <ComputedColumn></ComputedColumn>
        <Collate></Collate>
        <RowGuidCol>0</RowGuidCol>
        <IdentityNotForReplication>0</IdentityNotForReplication>
        <IdentityIncrement></IdentityIncrement>
        <IdentitySeed></IdentitySeed>
        <Identity>0</Identity>
        <XMLSchemaCollection/>
        <XMLContentDocument>CONTENT</XMLContentDocument>
        <PersistedComputed>0</PersistedComputed>
    </PERDomainMS05>

#2

Last editing I created this domain and changed all field to this domain.

After editing any table (adding a new field). DLL scripts generat the correct BIT type.