Opened 12 years ago

Closed 12 years ago

#973 closed defect (fixed)

Data in the primary key column during record add causes exception

Reported by: Mark J. Millard Owned by: Pete Cyr
Priority: minor Milestone: Post 1.0
Component: Curator Tool Version: 1.9.6.39 CT
Severity: Keywords: Adding new rows
Cc: Database Engine: SQL Server
Operating System: Windows 7 Ultimate 64 bit

Description

One way to fast add data is to create data for the required fields and tack on an empty primary key header on the end of the data. I was doing this and accidently included data from a previous add in the last row of the primary key column.

The CT threw an exception. I am attaching a tab delimited text accession file as an example. 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 System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Data.Common.Int32Storage.ConvertValue(Object value)
at System.Data.Index.FindNodeByKeys(Object[] originalKey)
at System.Data.DataTable.FindRow(DataKey key, Object[] values)
at System.Data.DataTable.FindByPrimaryKey(Object[] values)
at System.Data.DataRowCollection.Find(Object[] keys)
at GRINGlobal.Client.Common.UserInterfaceUtils.ImportTextToDataTableUsingKeys(String rawImportText, DataTable destinationTable, Char[] rowDelimiters, Char[] columnDelimiters, Int32& badRows, Int32& missingRows, LookupTables lookupTables, AppSettings appSettings)
at GRINGlobal.Client.Common.UserInterfaceUtils.ProcessDGVEditShortcutKeys(DataGridView dgv, KeyEventArgs e, String cno, LookupTables lookupTables, AppSettings appSettings)
at GRINGlobal.Client.Common.SharedUtils.ProcessDGVEditShortcutKeys(DataGridView dgv, KeyEventArgs e, String cno)
at GRINGlobal.Client.CuratorTool.GRINGlobalClientCuratorTool.ux_datagridviewMain_KeyDown(Object sender, KeyEventArgs e)
at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.DataGridView.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.DataGridView.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.DataGridView.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: 2.0.0.0
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll


GRINGlobal-CuratorTool

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/GRINGlobal-CuratorTool.exe


System.Windows.Forms

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll


System

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll


System.Drawing

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll


System.Data

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll


System.Xml

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll


GRINGlobal.Client.Common

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/GRINGlobal.Client.Common.DLL


System.Core

Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll


System.Configuration

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll


AccessionWizard

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/Wizards/AccessionWizard.dll


CooperatorWizard

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/Wizards/CooperatorWizard.dll


OrderWizard

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/Wizards/OrderWizard.dll


System.Web.Services

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll


ukp58yfv

Assembly Version: 1.9.6.39
Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll


System.Transactions

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll


System.EnterpriseServices

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll


AccessionForm

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/Forms/AccessionForm.dll


CrystalDecisions.CrystalReports.Engine

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.CrystalReports.Engine/13.0.2000.0__692fbea5521e1304/CrystalDecisions.CrystalReports.Engine.dll


CrystalDecisions.Shared

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Shared/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Shared.dll


CrystalDecisions.ReportAppServer.Controllers

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.Controllers/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Controllers.dll


CrystalDecisions.ReportAppServer.DataDefModel

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataDefModel.dll


CrystalDecisions.ReportAppServer.ClientDoc

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ClientDoc/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ClientDoc.dll


CrystalDecisions.ReportAppServer.CubeDefModel

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CubeDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CubeDefModel.dll


CrystalDecisions.ReportAppServer.ReportDefModel

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ReportDefModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ReportDefModel.dll


CrystalDecisions.ReportAppServer.CommLayer

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommLayer/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommLayer.dll


CrystalDecisions.ReportAppServer.CommonControls

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommonControls/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommonControls.dll


CrystalDecisions.ReportAppServer.CommonObjectModel

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.CommonObjectModel/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.CommonObjectModel.dll


CrystalDecisions.ReportAppServer.DataSetConversion

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.DataSetConversion/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.DataSetConversion.dll


CrystalDecisions.ReportAppServer.ObjectFactory

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.ObjectFactory/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.ObjectFactory.dll


CrystalDecisions.ReportAppServer.Prompting

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.Prompting/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.Prompting.dll


CrystalDecisions.ReportAppServer.XmlSerialize

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportAppServer.XmlSerialize/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportAppServer.XmlSerialize.dll


CrystalDecisions.ReportSource

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.ReportSource/13.0.2000.0__692fbea5521e1304/CrystalDecisions.ReportSource.dll


System.Web

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll


CrystalDecisions.Windows.Forms

Assembly Version: 13.0.2000.0
Win32 Version: 13.0.5.891
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/CrystalDecisions.Windows.Forms/13.0.2000.0__692fbea5521e1304/CrystalDecisions.Windows.Forms.dll


Accessibility

Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: ​file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll


FlashControlV71

Assembly Version: 1.0.3187.32366
Win32 Version: 1.0.3187.32366
CodeBase: ​file:///C:/Windows/assembly/GAC/FlashControlV71/1.0.3187.32366__692fbea5521e1304/FlashControlV71.dll


ShockwaveFlashObjects

Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: ​file:///C:/Windows/assembly/GAC/ShockwaveFlashObjects/1.0.0.0__692fbea5521e1304/ShockwaveFlashObjects.dll


ImageForm

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/Forms/ImageForm.dll


InventoryForm

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/Forms/InventoryForm.dll


OrderForm

Assembly Version: 1.9.6.39
Win32 Version: 1.9.6.39
CodeBase: ​file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Curator%20Tool/Forms/OrderForm.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.

Attachments (1)

Extra data needs friendly error.txt​ (2.3 KB ) - added by Mark J. Millard 12 years ago.
Text in the primary key column in the last row

Download all attachments as: .zip

Change History (4)

by Mark J. Millard, 12 years ago

Text in the primary key column in the last row

comment:1 by Pete Cyr, 12 years ago

Status: new → addressed

After code changes made in Curator Tool v1.9.6.40 - the situation outlined in this ticket should be resolved. Mark.... I found a way to trap the error message generated when you attempted to provide a malformed pkey in a copy/paste or drag/drop loading of data into the CT. The new code will attempt to resolve the provided pkey and when it fails it will create a new row with the existing data in that import data row (if possible). If you use the data provided in this ticket now you will get 7 new rows with no exception messages.

comment:2 by Mark J. Millard, 12 years ago

Status: addressed → released

Non-numeric data in a primary key field no longer causes exception.

comment:3 by Mark J. Millard, 12 years ago

Resolution: → fixed
Status: released → closed

No reports from NPGS testers of v1.9.6.41. So I am closing this ticket.

Note: See TracTickets for help on using tickets.