How can we help you today? How can we help you today?

type initializer for "_31" threw an exception

Hi,
Two months ago I installed SQL PROMPT 2 on my thinkpad and it worked fine.

Now something has happened to cause it to throw an exception.

I have uninstalled SQL Prompt and installed it again and I get the same error.

ERROR TEXT is below

Can you help?

Gregg :(

Environment details (hope this is enough):

    IBM THinkpad R50 Windows XP Pro MS .NET 1.1 MS .NET 2.0 Visual Studio 2003 SqlServer 2000



See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.TypeInitializationException: The type initializer for "_31" threw an exception. ---> System.Xml.XmlException: This is an unexpected token. The expected token is 'EQUALS'. Line 4, position 9131.
at System.Xml.XmlScanner.ScanToken(Int32 expected)
at System.Xml.XmlTextReader.SetLiteralValues(XmlAttributeTokenInfo fld)
at System.Xml.XmlTextReader.SetAttributeValues()
at System.Xml.XmlTextReader.ParseElement()
at System.Xml.XmlTextReader.Read()
at System.Xml.XPath.XPathDocument.ReadChildNodes(XPathContainer parent, String parentBaseUri, XmlReader reader, PositionInfo positionInfo)
at System.Xml.XPath.XPathDocument.ReadChildNodes(XPathContainer parent, String parentBaseUri, XmlReader reader, PositionInfo positionInfo)
at System.Xml.XPath.XPathDocument.Load(XmlReader reader)
at System.Xml.XPath.XPathDocument..ctor(XmlReader reader)
at RedGate.SQL.Shared.XMLSerializeFormatter.DeserializeRootObject(String fileName, String name, String typeName)
at _13._1()
at _31..cctor()
--- End of inner exception stack trace ---
at _40._38(Object , EventArgs )
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll

RedGate.SQLPrompt
Assembly Version: 2.0.0.59
Win32 Version: 2.0.0.59
CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt/RedGate.SQLPrompt.exe
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
RedGate.SQL.Shared
Assembly Version: 5.2.0.2
Win32 Version: 5.2.0.2
CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt/RedGate.SQL.Shared.DLL
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
RedGate.Update.Client
Assembly Version: 1.2.0.3
Win32 Version: 1.2.0.3
CodeBase: file:///C:/Program%20Files/Red%20Gate/SQL%20Prompt/RedGate.Update.Client.DLL
System.Web.Services
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.web.services/1.0.5000.0__b03f5f7f11d50a3a/system.web.services.dll
System.Web
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.web/1.0.5000.0__b03f5f7f11d50a3a/system.web.dll
gefwdscl
Assembly Version: 0.0.0.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.




gkeary
0

Comments

2 comments

  • Tilman
    Hi Gregg,

    I'm thinking that maybe your options or cache file is broken. Try deleting or renaming everything in

    C:\Documents and Settings\<user name>\Local Settings\Application Data\Red Gate\SQL Prompt.

    Obviously you will loose all your settings this way, including any snippets you might have added. You can however copy and paste them back, as it's just an xml file.

    Let me know if that helps,

    Tilman
    Tilman
    0
  • gkeary
    Thanks Tilman, that worked like a champ.

    My 'Application Data' subdirectory did become corrupted a few days ago so that's when my cache must have become DAMAGED!

    Best wishes

    Gregg
    :D
    gkeary
    0

Add comment

Please sign in to leave a comment.