﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	db_engine	os_version
526	Adding a new user and new address without geography causes exception on fk_c_g	Mark J. Millard	bweaver	"When you add a new user and add a new address without adding anything more and doing a save you get this exception.

If you search and add geography then the save works.

Thanks to nc7lb for discover and I verified.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint ""fk_c_g"". The conflict occurred in database ""gringlobal"", table ""dbo.geography"", column 'geography_id'.
The statement has been terminated.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteScalar()
   at GrinGlobal.Core.DataManagers.SqlDataManager.executeInsert(IDbCommand cmd)
   at GrinGlobal.Core.DataManager.Write(DataCommand cmd, Boolean returnId, String nameOfSequenceOrPrimaryKeyField)
   at GrinGlobal.Core.DataManager.Write(String procOrSql, Boolean returnId, String nameOfSequenceOrPrimaryKeyField, DataParameters dps)
   at GrinGlobal.Business.SecureData.SaveUser(Int32 userID, String userName, Boolean enabled, Int32 cooperatorID, Int32 currentCooperatorID, String title, String firstName, String lastName, String job, String discipline, String organization, String organizationCode, Int32 languageID, Boolean isActive, String addressLine1, String addressLine2, String addressLine3, String city, String postalIndex, String email, String primaryPhone, String secondaryPhone, String fax, Int32 siteID, String regionCode, String categoryCode, Int32 geographyID, String note)
   at GrinGlobal.Admin.AdminHostProxy.SaveUser(Int32 userID, String userName, Boolean enabled, Int32 cooperatorID, Int32 currentCooperatorID, String title, String firstName, String lastName, String job, String discipline, String organization, String organizationCode, Int32 languageID, Boolean isActive, String addressLine1, String addressLine2, String addressLine3, String admin1, String admin2, String email, String primaryPhone, String secondaryPhone, String fax, Int32 siteID, String regionCode, String categoryCode, Int32 geographyID, String note)
   at GrinGlobal.Admin.ChildForms.frmUser.save()
   at GrinGlobal.Admin.ChildForms.frmUser.btnSave_Click_1(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: 2.0.0.0
    Win32 Version: 2.0.50727.4952 (win7RTMGDR.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
GrinGlobal.Admin
    Assembly Version: 2.0.1417.0
    Win32 Version: 2.0.1417.0
    CodeBase: file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Admin/GrinGlobal.Admin.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    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.4927 (NetFXspW7.050727-4900)
    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.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
GrinGlobal.InstallHelper
    Assembly Version: 2.0.1417.0
    Win32 Version: 2.0.1417
    CodeBase: file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Admin/GrinGlobal.InstallHelper.DLL
----------------------------------------
GrinGlobal.Core
    Assembly Version: 2.0.1417.0
    Win32 Version: 2.0.1417
    CodeBase: file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Admin/GrinGlobal.Core.DLL
----------------------------------------
GrinGlobal.Business
    Assembly Version: 2.0.1417.0
    Win32 Version: 2.0.1417
    CodeBase: file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Admin/GrinGlobal.Business.DLL
----------------------------------------
System.Configuration.Install
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration.Install/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    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.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
GrinGlobal.Interface
    Assembly Version: 2.0.1417.0
    Win32 Version: 2.0.1417
    CodeBase: file:///C:/Program%20Files%20(x86)/GRIN-Global/GRIN-Global%20Admin/GrinGlobal.Interface.DLL
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.4926 built by: NetFXw7
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Web.Services
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
winprjwa
    Assembly Version: 2.0.1417.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.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.


"	defect	closed	major	Release Candidate 2	Admin Tool	2.0.1423		fixed	new user	brockweaver@…	SQL Server	Windows 7 Ultimate 64 bit
