Microsoft KB Archive/329853

= VSD Puts Spaces Around the Table Name and Causes an Error with DB2OLEDB =

Article ID: 329853

Article Last Modified on 9/27/2005

-

APPLIES TO


 * Microsoft Host Integration Server 2000 Standard Edition

-



This article was previously published under Q329853



SYMPTOMS
NOTE: This article also applies to Microsoft Host Integration Server 2000 Service Pack 1 (SP1).

If you drag a database table from Microsoft Visual Studio .NET Server Explorer to a WinForm, and you use the Microsoft OLE DB Provider for DB2 (DB2OLEDB) that is included with Host Integration Server 2000, you may receive the following error message:

The wizard detected the following problems when configuring the Data Adapter for &quot;MyTableName&quot;.

Details:

Generated Select Statement.

Error in Select clause: expression near &quot;&quot;

Error in From clause: near &quot;&quot;.

Unable to parse query text.

This error occurs when you use the Microsoft OLE DB Provider for DB2 when the update that is described in the following Knowledge Base article is applied to Microsoft Visual Studio .NET:

325790 FIX: Providers Fail When Visual Studio Database Designer Wizard Puts Brackets Around the Table Name

If the Visual Studio .NET update is not applied, the error that is described in article Q325790 occurs.



CAUSE
The Visual Studio Database (VSD) Designer Wizard creates a SELECT statement for OleDbDataAdapter that has brackets around the table name if the update that is described in Q325790 is not applied. The Microsoft OLE DB Provider for DB2 does not support brackets around the table or schema name, so the statement fails with the error that is described in Q325790.

If the update in Q325790 is applied to Visual Studio .NET, the VSD Designer Wizard works with the Microsoft OLE DB Provider for DB2 and puts spaces around the table name in the generated SELECT statement. This results in the error message that is described in the &quot;Symptoms&quot; section.



Service pack information
To resolve this problem, obtain the latest service pack for Microsoft Host Integration Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

328152 How to obtain the latest service pack for Host Integration Server 2000

Hotfix information
The English version of this fix 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.

  Date         Time   Version     Size     File name --  21-Oct-2002  19:31  5.0.0.900   667,920  Db2oledb.dll

NOTE: Because of file dependencies, the most recent fix that contains the preceding files may also contain additional files.



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 corrected in Microsoft Host Integration Server 2000 Service Pack 2.



MORE INFORMATION
The update that is described in this article adds support for DBLITERAL_QUOTE_PREFIX and DBLITERAL_QUOTE_SUFFIX to the Microsoft OLE DB Provider for DB2. DBLITERAL_QUOTE_PREFIX and DBLITERAL_QUOTE_SUFFIX are defined to specify &quot; (double quotation marks) as the character put around table names in the VSD Designer Wizard-generated SELECT statements.

Keywords: kbbug kbfix kbqfe kbhotfixserver KB329853

-

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

© Microsoft Corporation. All rights reserved.