S
sirinath
Hi,
I am getting this exception when I am trying to insert the second item
to an access DB. The values are from another OleDB source.
If there are links about this exception please let me know.
The full exception:
A first chance exception of type 'System.Data.OleDb.OleDbException'
occurred in System.Data.dll
System.Data.OleDb.OleDbException: The changes you requested to the
table were not successful because they would create duplicate values
in the index, primary key, or relationship. Change the data in the
field or fields that contain duplicate data, remove the index, or
redefine the index to permit duplicate entries and try again.
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&
executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior
behavior, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at
PairTraderWindowsApplication.ConfigForm.importCompany(OleDbConnection
conDB, OleDbConnection conImportExcel, String sectorName) in C:
\Documents and Settings\sumindad\My Documents\Visual Studio
2005\Projects\PairTraderWindowsApplication\PairTraderWindowsApplication
\Config.cs:line 226
at PairTraderWindowsApplication.ConfigForm.doImport(Object
dummyObj) in C:\Documents and Settings\sumindad\My Documents\Visual
Studio 2005\Projects\PairTraderWindowsApplication
\PairTraderWindowsApplication\Config.cs:line 132
Best regards, Suminda Sirinath Salpitikorala Dharmasena
I am getting this exception when I am trying to insert the second item
to an access DB. The values are from another OleDB source.
If there are links about this exception please let me know.
The full exception:
A first chance exception of type 'System.Data.OleDb.OleDbException'
occurred in System.Data.dll
System.Data.OleDb.OleDbException: The changes you requested to the
table were not successful because they would create duplicate values
in the index, primary key, or relationship. Change the data in the
field or fields that contain duplicate data, remove the index, or
redefine the index to permit duplicate entries and try again.
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&
executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior
behavior, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
at
PairTraderWindowsApplication.ConfigForm.importCompany(OleDbConnection
conDB, OleDbConnection conImportExcel, String sectorName) in C:
\Documents and Settings\sumindad\My Documents\Visual Studio
2005\Projects\PairTraderWindowsApplication\PairTraderWindowsApplication
\Config.cs:line 226
at PairTraderWindowsApplication.ConfigForm.doImport(Object
dummyObj) in C:\Documents and Settings\sumindad\My Documents\Visual
Studio 2005\Projects\PairTraderWindowsApplication
\PairTraderWindowsApplication\Config.cs:line 132
Best regards, Suminda Sirinath Salpitikorala Dharmasena