Microsoft KB Archive/919236

= Error message when you start SQL Server 2005 Management Studio: &quot;Input string was not in a correct format&quot; =

Article ID: 919236

Article Last Modified on 6/5/2006

-

APPLIES TO


 * Microsoft SQL Server 2005 Standard Edition
 * Microsoft SQL Server 2005 Workgroup Edition
 * 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:



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  registry key. If the existing value of the  registry key is an invalid value and cannot be removed, follow these steps:  Start Registry Editor. Locate and then double-click the following registry key:

 

 In the Edit String dialog box, change the value to a viewable character, such as a . Click OK to close the Edit String dialog box. Double-click the  registry entry. Remove the value, and then click OK to close the Edit String dialog box.</li> Exit Registry Editor.</li> Restart SQL Server 2005 Management Studio.</li></ol>

<div class="moreinformation_section">

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.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Keywords: kbsql2005repl kbexpertiseadvanced kbtshoot kbprb KB919236

-

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

© Microsoft Corporation. All rights reserved.