Microsoft KB Archive/814681

= You receive an &quot;unspecified error&quot; error message when you try to open a query file that is under source code control in Visual Studio .NET =

Article ID: 814681

Article Last Modified on 4/14/2004

-

APPLIES TO


 * Microsoft Visual SourceSafe 6.0 Standard Edition
 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer

-





SYMPTOMS
In Microsoft Visual Studio .NET, when you try to open a query file that is under source code control, you receive the following error message:

Unspecified Error



CAUSE
This behavior occurs if the value of the Type property of the stored query is Text in Microsoft Visual SourceSafe. When you first add a blank query to Visual SourceSafe from Visual Studio .NET, the query is detected as text. However, because queries use Unicode text, if you modify the query later and then check it back in to Visual SourceSafe, the format of the query changes to Unicode text and the query becomes corrupted.



RESOLUTION
When you modify the blank query and then check it in, you receive the following warning message in Visual SourceSafe:

The character encoding for the file .dtq has changed. For example, it may have changed from text to binary, or from ANSI text to Unicode text. Because your source control provider for this file may not be able to merge files with different types or encodings correctly, you may need to manually change the file type directly in the source control store to match the new encoding you have just saved.

After you close this message box, follow these steps:
 * 1) Open Visual SourceSafe Explorer.
 * 2) Right-click the query, and then click Properties.
 * 3) Change the value of the Type property from Text to Binary.
 * 4) Click Close to save this change.



STATUS
This behavior is by design.



Steps to reproduce the behavior
To reproduce this behavior, follow these steps:
 * 1) In Visual Studio .NET, create a new Database solution.
 * 2) Right-click the Queries folder, and then add a new query.
 * 3) Close the new query without adding any tables to it.
 * 4) Add the Database solution to Visual SourceSafe.
 * 5) Open the query that you created in step 2, and then add a table fields to the query.

Note Check out the project and the files when you receive a message to do so.
 * 1) Check in the query. You receive the warning message that appears in the &quot;Resolution&quot; section.
 * 2) Click OK to close the message box, and then quit Visual Studio .NET.
 * 3) Start Visual Studio .NET, and then open the Database solution from Visual SourceSafe. Select a new location for the working folder of your solution.
 * 4) Right-click the query file, and then click Open.

Note In Visual Studio .NET 2003, click Open and Run.

Keywords: kberrmsg kbinterop kbunicode kbprb kbdataobject kbsrccontrol KB814681

-

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

© Microsoft Corporation. All rights reserved.