You receive an "unspecified error" error message when you try to open a query file that is under source code control in Visual Studio .NET (814681)



The information in this article applies to:

  • Microsoft Visual SourceSafe, 32-bit, for Windows 6.0
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition

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 Local Path of Query 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.

MORE INFORMATION

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.
  6. Check in the query. You receive the warning message that appears in the "Resolution" section.
  7. Click OK to close the message box, and then quit Visual Studio .NET.
  8. Start Visual Studio .NET, and then open the Database solution from Visual SourceSafe. Select a new location for the working folder of your solution.
  9. Right-click the query file, and then click Open.

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

Modification Type:MajorLast Reviewed:4/14/2004
Keywords:kberrmsg kbprb kbUnicode kbDataObject kbSrcControl kbinterop KB814681 kbAudDeveloper