Microsoft KB Archive/897291

= You receive a &quot;Type &quot;http://www.w3.org/2001/XMLSchema:char&quot; is not declared or not a simple type&quot; error message when you try to generate a schema by using the SQL Transport Schema Generation Wizard in BizTalk Server 2004 =

Article ID: 897291

Article Last Modified on 3/16/2007

-

APPLIES TO


 * Microsoft BizTalk Server 2004 Enterprise Edition
 * Microsoft BizTalk Server 2004 Standard Edition
 * Microsoft BizTalk Server 2004 Developer Edition
 * Microsoft BizTalk Server 2004 Partner Edition

-





SYMPTOMS
When you try to generate a schema by using the SQL Transport Schema Generation Wizard in Microsoft BizTalk Server 2004, you receive the following error message:

Type &quot;http://www.w3.org/2001/XMLSchema:char&quot; is not declared or not a simple type. An error occurs at, (0, 0).



CAUSE
This problem occurs when you have a SELECT statement or a stored procedure that returns a column that is defined as either a char(1) data type or an nchar(1) data type.



WORKAROUND
To work around this problem, use one of the following methods:

Method 1
In the SELECT statement or the stored procedure you can cast the column as a char(2) data type or as a varchar(1) data type. For example, the following statement changes the data type from char(1) to char(2).

SELECT CustomerID, CAST(CustomerType as char(2)) as CustomerType FROM customers

Note After you have generated the schema, you can change the SELECT statement or the stored procedure back to the original form.

Method 2
Modify the XDRtoXSD.xslt xml transformation file that BizTalk Server uses to transform the SQL data type to an XML data type. The file is typically located in the C:\Program Files\Microsoft BizTalk Server 2004 folder. To modify the file, first locate the following line on line 899.

xs:char

After you have located the line, change the line to the following, and then save the file.

xs:string



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
For more information about the BizTalk SQL adapter, visit the following Microsoft Developer Network (MSDN) Web site:

http://msdn2.microsoft.com/en-us/library/ms916013.aspx

Additional query words: BTS2004 SQL Schema EBizSupport 1718

Keywords: kbbtsadapters kbtshoot kbprb KB897291

-

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

© Microsoft Corporation. All rights reserved.