Hello,
Every time I try to extract SQL from code, I get an unhandled exception with this message:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
*********** Exception Text ********
System.NullReferenceException: Object reference not set to an instance of an object.
at com.sqlinform.api.parser.ParserPreparer.concatenateDecimaNumber()
at com.sqlinform.api.beautifier.Beautifier.init(TokenList tl)
at com.sqlinform.api.SQLFormatter.formatSQL(String unformattedStatement)
at SQLinFormNpp.SQLFormatterNpp.formatSQLNpp(String unformattedStatement)
at SQLinFormNpp.frmMyDlg.doPreviewBoxFormatting()
at SQLinFormNpp.frmMyDlg.extractSQLbutton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.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)
******** Loaded Assemblies ********
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4744.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
SQLinFormDesktop
Assembly Version: 6.24.9.15
Win32 Version: 6.24.09.15
CodeBase: file:///C:/Users/jp1l/_Apps/SQLinFormWinApp/SQLinFormDesktop.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4734.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4744.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4390.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
SQLinFormNpp
Assembly Version: 6.24.9.15
Win32 Version: 6.24.09.15
CodeBase: file:///C:/Users/jp1l/_Apps/SQLinFormWinApp/SQLinFormNpp.DLL
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4744.0 built by: NET48REL1LAST_C
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.8.4084.0 built by: NET48REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
******** JIT Debugging ***********
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (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 computer
rather than be handled by this dialog box.
I have tried three different versions and get the same message on all of them.
I think it must be a setup issue on my end somehow, but haven't figured it out.
Thank you,
Jim
Hi @cmputrace,
thanks for your feedback. would you mind sending your statement to info @ sqlinform . com
Regards
Guido
no need to send the statement. I am able to reproduce the issue
Please download the new Release and give it a try. Issue has been fixed
Regards
Guido
I can't NOT reproduce the issue 🙂
I run some pretty hairy SQL through the tool, but sometimes get really strange formatting. I try to make the settings output SQL more like I write code than how most people write SQL.
I have my own tool to create queries and it outputs SQL how I like (of course, I wrote it), but I do have to deal with a lot of inline SQL in C# and Java written by others, so I have used SQLInForm for YEARS to get the SQL as close to my format as possible.
Started out with the pure Java version in 2010 and have purchased that, the np++ and desktop versions since.
Thank you!
Jim
thanks for this nice feedback.
when you get "strange" formatting results, you could send me your SQL and the strange results and I can try (not guarantee) to make it better
Thank You! It works; however, I can still break it. What I just found out is that I MUST choose a profile before trying to extract the SQL from code. I can live with that, but a popup notice telling me that's the problem would be helpful.
Thank you again!
Jim
Are you working with the most recent release?