FIX: SQLXML that includes MDAC 2.7 or MDAC 2.8 returns GUID fields without "{}" characters (330019)



The information in this article applies to:

  • SQLXML 3.0 SP1
  • Microsoft Data Access Components 2.7
  • Microsoft Data Access Components 2.8

This article was previously published under Q330019

SYMPTOMS

When you upgrade from Microsoft Data Access Components (MDAC) 2.6 that is included with SQLXML 2.6 to MDAC 2.7 that is included with SQLXML 3.0, or to MDAC 2.8 that is included with Microsoft Windows Server 2003, you find that GUID data that is retrieved through SQLXML does not contain opening and closing braces ({}) around the data. However, the same GUID data that is retrieved directly through the Microsoft SQL Server OLE DB Provider from the same SQL Server 2000 database contains opening and closing braces ({}).

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next MSXML Service Pack 2 that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question. The English version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

MDAC 2.7

    Date            Time              Version               Size             File name   
   ----------------------------------------------------------------
   21-Oct-2002	 5:34:05 PM  2000.81.9031.9  196,608 bytes	 sqlxmlx.dll	
				


MDAC 2.8

    Date            Time              Version               Size             File name   
   ----------------------------------------------------------------
     12-Feb-2004  16:44  2000.85.1032.0    208,896  Sqlxmlx.dll      

				
Note For a list of all the hotfixes available for MDAC 2.8, click the following article number to view the article in the Microsoft Knowledge Base:

839801 FIX: Hotfixes are available for MDAC 2.8


STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the behavior

  1. In SQL Query Analyzer, run the following statements:
    use Northwind
    CREATE TABLE GuidTable (id int ,	guidField uniqueidentifier)
    go
    insert into guidtable values(1, '{3AD5520A-8536-4AEC-878F-5648F79D7E47}')
    insert into guidtable values(2, '{104350EB-2CBF-4CB6-8E8B-EBFEA662E63B}')
    go
    
  2. On a computer that has MDAC 2.7 installed, use the Configure SQLXML Support in IIS Wizard to create a directory (for example: mysqlxml_VirtDir). Make sure that this points to the Microsoft SQL Server Northwind sample database.
  3. When you configure this directory, make sure that on the Setting tab, that you click to select Allow URL queries.
  4. Run following query:
    http://mysqlhost/mysqlxml_VirtDir?sql=select * from guidtable for xml auto&root=root

You expect the data to appear as follows:
<?xml version="1.0" encoding="utf-8" ?>
 <root>
 <guidtable id="1" guidField="{3AD5520A-8536-4AEC-878F-5648F79D7E47}" /> 
 <guidtable id="2" guidField="{104350EB-2CBF-4CB6-8E8B-EBFEA662E63B}" /> 
 </root>
However, the data that is returned does not contain the {} characters:
<?xml version="1.0" encoding="utf-8" ?> 
<root> 
<guidtable id="1" guidField="3AD5520A-8536-4AEC-878F-5648F79D7E47" /> 
<guidtable id="2" guidField="104350EB-2CBF-4CB6-8E8B-EBFEA662E63B" />
</root>
To make sure that the {} characters appear around SQLXML GUID data, install the hotfix, and then follow these steps:
  1. Locate the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SQLXMLX
  2. Create a DWORD value that is named FORXML_GenerateGUIDBraces
  3. Set the Value to "1". You can reset this by setting the value to "0".

Modification Type:MinorLast Reviewed:10/11/2005
Keywords:kbHotfixServer kbQFE kbbug kbfix KB330019 kbAudDeveloper