Azure-Player / DataScriptWriter

Windows desktop application allows you to connect to Microsoft SQL Server database and make a T-SQL script of data for selected tables.
36 stars 25 forks source link

Unhandled exception (Unknown SQL data type! (datetimeoffset). #20

Closed OsamaAlmaani closed 3 years ago

OsamaAlmaani commented 3 years ago

An unhandled exception occurs in the application when trying to generate a script for a table with columns of type [DateTimeOffset]

---------------------------------------- Exception Details----------------------------------------

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

************** Exception Text **************
System.Exception: Unknown SQL data type! (datetimeoffset)
   at DataScriptWriter.ScriptWriter.SerializeRowValues(DataRow row, DataTable colInfoTable, String prefix, String suffix)
   at DataScriptWriter.ScriptWriter.ScriptTableMerge(ScriptObject so, DataTable colInfoTable, DataTable mainTable, StreamWriter w, String colList, String scolList, String PKcolListOn, String colCastList)
   at DataScriptWriter.ScriptWriter.GenerateForTable(ScriptObject so)
   at DataScriptWriter.frmMain.bbiScript_ItemClick(Object sender, ItemClickEventArgs e)
   at DevExpress.XtraBars.BarItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarButtonItem.OnClick(BarItemLink link)
   at DevExpress.XtraBars.BarItemLink.OnLinkClick()
   at DevExpress.XtraBars.BarButtonItemLink.OnLinkClick()
   at DevExpress.XtraBars.BarItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.BarItemLink.OnLinkActionCore(BarLinkAction action, Object actionArgs)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
   at DevExpress.XtraBars.Ribbon.Handler.BaseRibbonHandler.OnUnPressItem(DXMouseEventArgs e, RibbonHitInfo hitInfo)
   at DevExpress.XtraBars.Ribbon.Handler.BaseRibbonHandler.OnUnPress(DXMouseEventArgs e, RibbonHitInfo hitInfo)
   at DevExpress.XtraBars.Ribbon.Handler.BaseRibbonHandler.OnMouseUp(DXMouseEventArgs e)
   at DevExpress.XtraBars.Ribbon.Handler.RibbonHandler.OnMouseUp(DXMouseEventArgs e)
   at DevExpress.XtraBars.Ribbon.RibbonControl.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)
   at DevExpress.XtraBars.Ribbon.RibbonControl.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.4341.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
DataScriptWriter
    Assembly Version: 2.3.0.0
    Win32 Version: 2.3.0.0
    CodeBase: file:///C:/Users/osama/Desktop/DataScriptWriter_v2.3.0/DataScriptWriter/DataScriptWriter.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4341.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.4300.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.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
DevExpress.XtraBars.v13.2
    Assembly Version: 13.2.15.0
    Win32 Version: 13.2.15.0
    CodeBase: file:///C:/Users/osama/Desktop/DataScriptWriter_v2.3.0/DataScriptWriter/DevExpress.XtraBars.v13.2.DLL
----------------------------------------
DevExpress.Utils.v13.2
    Assembly Version: 13.2.15.0
    Win32 Version: 13.2.15.0
    CodeBase: file:///C:/Users/osama/Desktop/DataScriptWriter_v2.3.0/DataScriptWriter/DevExpress.Utils.v13.2.DLL
----------------------------------------
DevExpress.XtraEditors.v13.2
    Assembly Version: 13.2.15.0
    Win32 Version: 13.2.15.0
    CodeBase: file:///C:/Users/osama/Desktop/DataScriptWriter_v2.3.0/DataScriptWriter/DevExpress.XtraEditors.v13.2.DLL
----------------------------------------
DevExpress.Data.v13.2
    Assembly Version: 13.2.15.0
    Win32 Version: 13.2.15.0
    CodeBase: file:///C:/Users/osama/Desktop/DataScriptWriter_v2.3.0/DataScriptWriter/DevExpress.Data.v13.2.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.4341.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
----------------------------------------
DevExpress.XtraGrid.v13.2
    Assembly Version: 13.2.15.0
    Win32 Version: 13.2.15.0
    CodeBase: file:///C:/Users/osama/Desktop/DataScriptWriter_v2.3.0/DataScriptWriter/DevExpress.XtraGrid.v13.2.DLL
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Data.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Data.Linq.dll
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4341.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
CAMOsoft.DbUtils
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Users/osama/Desktop/DataScriptWriter_v2.3.0/DataScriptWriter/CAMOsoft.DbUtils.DLL
----------------------------------------
System.Transactions
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Runtime.Caching
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Caching/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Caching.dll
----------------------------------------
System.Numerics
    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.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.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.
RaymondMolenaar commented 3 years ago

I had the same issue, created a pullrequest for this: https://github.com/SQLPlayer/DataScriptWriter/pull/21