Microsoft KB Archive/918295

= Error message when you use an .odc file to connect to a specific table in a mail merge data source in a 2007 Office program or in Office 2003: &quot;Record 'number' contained too few data fields&quot; =

Article ID: 918295

Article Last Modified on 9/25/2007

-

APPLIES TO


 * Microsoft Office Professional 2007
 * Microsoft Office Publisher 2007
 * Microsoft Office Small Business 2007
 * Microsoft Office Ultimate 2007
 * Microsoft Office Word 2007
 * Microsoft Office Professional Edition 2003
 * Microsoft Office Standard 2007
 * Microsoft Office Standard Edition 2003
 * Microsoft Office Student and Teacher Edition 2003
 * Microsoft Office Small Business Edition 2003
 * Microsoft Office Basic Edition 2003
 * Microsoft Office Access 2003
 * Microsoft Office Excel 2003
 * Microsoft Office FrontPage 2003
 * Microsoft Office OneNote 2003
 * Microsoft Office Outlook 2003
 * Microsoft Office PowerPoint 2003
 * Microsoft Office Project Professional 2003
 * Microsoft Office Project Standard 2003
 * Microsoft Office Publisher 2003
 * Microsoft Office Visio Professional 2003
 * Microsoft Office Visio Standard 2003
 * Microsoft Office Word 2003

-



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
Consider the following scenario. You use an .odc file to connect to a specific table in a mail merge data source. Then, you perform a mail merge in a 2007 Microsoft Office program or in a Microsoft Office 2003 program. In this scenario, the Mail Merge Recipients dialog box is empty.

You may receive the following error message in Microsoft Office Word 2003:

Record  contained too few data fields.

You may receive the following error message in Microsoft Office Publisher 2003:

Error has occurred: [Microsoft][ODBC SQL Server Driver][SQL Server] The cursor was not declared. [Microsoft][ODBC SQL Server Driver][SQL Server] Invalid object name.



CAUSE
This problem may occur when the schema name is not included in the SQL statement that is sent to the ODBC data source.



RESOLUTION
This problem was first fixed in a hotfix that is now contained in a service pack. If you installed the latest Office 2003 service pack, you do not have to install the hotfix.

Service pack information
This problem is corrected in Office 2003 Service Pack 3. To resolve this problem, obtain the latest service pack for Office 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

870924 How to obtain the latest service pack for Office 2003

After you install the service pack, follow the steps that are listed in the &quot;How to enable the hotfix&quot; section of the article to set the  registry key and to activate the hotfix.

How to obtain the hotfix
This issue is fixed in the Office 2003 post-Service Pack 2 Hotfix Package that is dated April 12, 2006. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

917878 Description of the Office 2003 post-Service Pack 2 hotfix package: April 12, 2006

How to enable the hotfix
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To enable this hotfix, follow these steps:  Exit all Office programs. Click Start, click Run, type regedit, and then click OK. If you are using a 2007 Office suite, locate and then click the following registry subkey:

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common

If you are using Office 2003, locate and then click the following registry subkey:

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common

 On the Edit menu, point to New, and then click DWORD Value. Type UseQualifiedTableNameForMailMerge, and then press ENTER. Right-click UseQualifiedTableNameForMailMerge, and then click Modify.</li> In the Value data box, type 1, and then click OK.</li> On the File menu, click Exit to exit Registry Editor.</li></ol>

<div class="status_section">

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

This problem was first corrected in Office 2003 Service Pack 3.

Additional query words: office2003 office2k3 office11 off2003 off2k3 off11 access2003 access2k3 access11 acc2003 acc2k3 acc11 excel2003 excel2k3 excel11 xl2003 xl2k3 xl11 frontpage2003 frontpage2k3 frontpage11 fp2003 fp2k3 fp11 onenote2003 onenote2k3 onenote11 on2003 on2k3 on11 outlook2003 outlook2k3 outlook11 ol2003 ol2k3 ol11 powerpoint2003 powerpoint2k3 powerpoint11 ppt2003 ppt2k3 ppt11 project2003 project2k3 project11 prj2003 prj2k3 prj11 publisher2003 publisher2k3 publisher11 pub2003 pub2k3 pub11 visio2003 visio2k3 visio11 vso2003 vso2k3 vso11 word2003 word2k3 word11 wd2003 wd2k3 wd11

Keywords: kberrmsg kbbug kbfix kbregistry kbqfe kbmerge kbpubtypekc kbexpertiseinter kboffice2003sp3fix KB918295

-

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

© Microsoft Corporation. All rights reserved.