Microsoft KB Archive/825392

= A query is not successful if it has a column that contains one or more space characters =

Article ID: 825392

Article Last Modified on 1/3/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Windows CE Edition 2.0
 * Microsoft Encarta Interactive World Atlas 2001

-



SYMPTOMS
When you run a query on a Microsoft SQL Server 2000 Windows CE Edition version 2.0 database, and the query has a column that contains one or more space characters, the query may not be successful. Additionally, you may receive the following error message:

FAILED: select < > from < >

Error: 0x80040e14 DB_E_ERRORSINCOMMAND

Native Error: (25503)

Description: The column name is not valid. [,,, (if any), ,]

Interface defining error: IID_ICommand

Param. 0: 0

Param. 1: 0

Param. 2: 0

Param. 3:

Param. 4: col1

Param. 5:

Note For SQL Server 2000 CE databases that are earlier than version 2.0, the query may not be successful, and you may not receive an error message.



RESOLUTION
To resolve this problem, enclose the column name that contains spaces in quotation marks (&quot; &quot;), and then run the query. For example, you can run the following query, and the query results are displayed successfully: SELECT &quot;col1 &quot; FROM testtable



Steps to Reproduce the Problem
To reproduce the problem, follow these steps:  Open SQLCE Query. In SQL Server CE Query Analyzer, select your database or create a new test database.  Create a table that is named testtable. To do so, click the SQL tab in SQL Server CE Query Analyzer, and then run the following query: CREATE TABLE testtable (&quot;col1 &quot; int)   Insert a record in the testtable table. To do so, run the following query: INSERT INTO testtable VALUES (1)   Select the inserted record from the testtable table. To do so, run the following query: SELECT col1 FROM testtable Note You may receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article. 

Keywords: kberrmsg kbtsql kbtable kbquery kbdatabase kbbug KB825392

-

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

© Microsoft Corporation. All rights reserved.