Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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 ({}).

↑ Back to the top


Resolution

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site: Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language. 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

↑ Back to the top


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".

↑ Back to the top


Keywords: KB330019, kbfix, kbbug, kbqfe, kbhotfixserver, kbautohotfix

↑ Back to the top

Article Info
Article ID : 330019
Revision : 12
Created on : 11/15/2007
Published on : 11/15/2007
Exists online : False
Views : 463