Microsoft KB Archive/321573

= FIX: Error message C1046 when you use double-byte character set values =

Article ID: 321573

Article Last Modified on 1/19/2006

-

APPLIES TO


 * Microsoft Visio for Enterprise Architects 2002, when used with:
 * Microsoft Visual Studio .NET 2002 Enterprise Architect

-



This article was previously published under Q321573



SYMPTOMS
When you use double-byte character set (DBCS) values for an object in the Object Role Modeling (ORM) Source Model, you may receive the following error message, even though you did not enter more characters than the Length that is specified for the Data Type for the object.

&quot;Error C1046: ' ' : Object Type has textual value of ' ' specified in its value range constraint that is larger than what the datatype allows.&quot;



RESOLUTION
To resolve this problem, install the latest service release for Visio for Enterprise Architects 2002. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

320765 Visio2002: How to Obtain the Latest Visio for Enterprise Architects 2002 Service Release



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Visio for Enterprise Architects 2002 Service Release 1 (SR-1).



Steps to Reproduce the Behavior
To reproduce the behavior, you must have a Far East language Input Method Editor (IME) installed for your operating system. The steps presented here use a Japanese IME, but you can use any language that requires DBCS.

To reproduce the problem, follow these steps:  Start Visio. On the File menu, point to New, point to Database, and then click ORM Source Model. To create a new fact, do the following:  On the Database menu, point to View, and then click Fact Editor. In the first Object Name text box, type Parent . In the Relationship text box, type Has .</li> In the second Object Name text box, type Child.

Do not type anything in the Inverse Relationship box.</li> Click OK to close the Fact Editor.</li></ol> </li> On the Database menu, point to View, and then click Business Rules.</li> Drag the fact that you created in step 3 to the ORM Diagram drawing grid.</li> Click the predicate on the drawing page. On the Database Properties tab, click the Constraints category, and then click Add Internal.</li> In the Add Constraint dialog box, click Uniqueness for the Constraint type, click to select the Primary check box, and then click in the left role box of the predicate. The left box becomes yellow and contains the number 1. Click OK.</li> Click the Parent object on the drawing page, and then click the Database Properties tab.</li> In the Ref Mode category, type ID for the Reference, and then type Identification for the Type.</li> On the Database menu, click Model Error Check. You do not receive any errors.</li> In the Data Type category, type the following values:

'''Category: Text

Type: Fixed Length

Length: 20

Size: Double Byte Character Set'''

</li> Click Show portable data type.</li> On the Database Properties tab, click the Value category, in the Value text box, type at least 11 and no more than 20 Japanese characters as the value, and then click Add.</li> On the Database menu, click Model Error Check.</li></ol>

Additional query words: kbVSNETEntArch2002sr1Fix visio2002 vso2002 VEA

Keywords: kbtshoot kbbug kbfix kbvs2002sp1sweep kbvs2005swept kbvs2005doesnotapply KB321573

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.