Error message when you start SQL Server 2005 Management Studio: "Input string was not in a correct format" (919236)



The information in this article applies to:

  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Workgroup
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition

Bug #: 422648 (SQLBUDT)


Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

SYMPTOMS

When you start Microsoft SQL Server 2005 Management Studio, you may receive the following error message:
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Input string was not in a correct format.
If you click Detail in the dialog box, the following error message text appears at the top of the details:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.LoginControl.InitFromLastUsedServerType()
at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.DoOneTimeInitialization()
at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.OnVisibleChanged(EventArgs e)
at Microsoft.SqlServer.Management.UI.VSIntegration.ShellConnectionDialog.OnVisibleChanged(EventArgs e)
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

CAUSE

This problem occurs if the value of the following registry key is not empty or is set to an invalid value:

HKEY_CURRENT_USER\Control Panel\International\sPositiveSign

WORKAROUND

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

To work around this problem, remove the value of the HKEY_CURRENT_USER\Control Panel\International\sPositiveSign registry key. If the existing value of the HKEY_CURRENT_USER\Control Panel\International\sPositiveSign registry key is an invalid value and cannot be removed, follow these steps:
  1. Start Registry Editor.
  2. Locate and then double-click the following registry key:

    HKEY_CURRENT_USER\Control Panel\International\sPositiveSign

  3. In the Edit String dialog box, change the value to a viewable character, such as a.
  4. Click OK to close the Edit String dialog box.
  5. Double-click the HKEY_CURRENT_USER\Control Panel\International\sPositiveSign registry entry.
  6. Remove the value, and then click OK to close the Edit String dialog box.
  7. Exit Registry Editor.
  8. Restart SQL Server 2005 Management Studio.

MORE INFORMATION

Other dialog boxes may also report error messages about incorrect values in SQL Server Management Studio if the property values are set to 0.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MinorLast Reviewed:6/5/2006
Keywords:kbsql2005repl kbExpertiseAdvanced kbtshoot kbprb KB919236 kbAudDeveloper kbAudITPRO