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.

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


View products that this article applies to.

This article was previously published under Q329853

↑ Back to the top


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

Details:

Generated Select Statement.

Error in Select clause: expression near ""
Error in From clause: near "".
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.

↑ Back to the top


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

↑ Back to the top


Resolution

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.

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

This problem was corrected in Microsoft Host Integration Server 2000 Service Pack 2.

↑ Back to the top


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 " (double quotation marks) as the character put around table names in the VSD Designer Wizard-generated SELECT statements.

↑ Back to the top


Keywords: KB329853, kbhotfixserver, kbqfe, kbfix, kbbug

↑ Back to the top

Article Info
Article ID : 329853
Revision : 3
Created on : 9/27/2005
Published on : 9/27/2005
Exists online : False
Views : 277