[Quantproject-developers] QuantProject/b2_DataAccess/Tables Bars.cs, 1.5, 1.6
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2009-01-11 20:15:29
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15587/b2_DataAccess/Tables Modified Files: Bars.cs Log Message: If a duplicate bar is asked to be inserted, now the exception is handled (and the program can go on) Index: Bars.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/Bars.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Bars.cs 7 Jan 2009 23:23:07 -0000 1.5 --- Bars.cs 11 Jan 2009 20:15:17 -0000 1.6 *************** *** 537,541 **** ticker , exchange , dateTimeForOpenInESTTime , interval , open , high , low , close , volume ); ! SqlExecutor.ExecuteNonQuery( sqlCommand ); } #endregion AddBar --- 537,550 ---- ticker , exchange , dateTimeForOpenInESTTime , interval , open , high , low , close , volume ); ! try ! { ! SqlExecutor.ExecuteNonQuery( sqlCommand ); ! } ! catch( Exception exception ) ! { ! if ( !DataBase.IsExceptionForForbiddenDataDuplication( exception ) ) ! // the exception is not due to a duplicated bar ! throw exception; ! } } #endregion AddBar |