[Quantproject-developers] QuantDownloader/Downloader TickerDownloader.cs,1.11,1.12
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2004-08-04 23:04:28
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31993/Downloader Modified Files: TickerDownloader.cs Log Message: Fixed minor bugs Index: TickerDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerDownloader.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TickerDownloader.cs 25 Jul 2004 12:12:15 -0000 1.11 --- TickerDownloader.cs 4 Aug 2004 23:04:20 -0000 1.12 *************** *** 219,230 **** this.setStreamsFromYahoo(currBeginDate, currEndDate); this.addCurrentStreamToTable(); - this.updateCurrentStatus(currEndDate.ToShortDateString()); if(this.streamReader!=null) this.streamReader.Close(); //this.updateCurrentStatus( d + "/" + e + "/" + f ); } catch (Exception exception) { ! MessageBox.Show( exception.ToString() ); /*updateCurrentStatus( "Trial: " + numTrials ); numTrials++; --- 219,234 ---- this.setStreamsFromYahoo(currBeginDate, currEndDate); this.addCurrentStreamToTable(); if(this.streamReader!=null) this.streamReader.Close(); + else + return; + this.updateCurrentStatus(currEndDate.ToShortDateString()); + //this.updateCurrentStatus( d + "/" + e + "/" + f ); } catch (Exception exception) { ! string notUsed = exception.ToString(); ! //MessageBox.Show( exception.ToString() ); /*updateCurrentStatus( "Trial: " + numTrials ); numTrials++; *************** *** 280,284 **** catch (Exception ex) { ! MessageBox.Show( ex.ToString() ); } p_myForm.dataGrid1.Refresh(); --- 284,289 ---- catch (Exception ex) { ! string notUsed = ex.ToString(); ! //MessageBox.Show( ex.ToString() ); } p_myForm.dataGrid1.Refresh(); *************** *** 348,352 **** catch(Exception ex) { ! MessageBox.Show(ex.ToString()); } } --- 353,358 ---- catch(Exception ex) { ! string notUsed = ex.ToString(); ! //MessageBox.Show(ex.ToString()); } } *************** *** 388,393 **** QuantProject.DataAccess.Tables.Quotes.ComputeCloseToCloseValues(this.downloadedValuesFromSource); this.adapter.OleDbDataAdapter.ContinueUpdateOnError = true; ! this.adapter.OleDbDataAdapter.Update(this.downloadedValuesFromSource); ! this.updateCurrentStatusDatabaseUpdated("YES"); } --- 394,402 ---- QuantProject.DataAccess.Tables.Quotes.ComputeCloseToCloseValues(this.downloadedValuesFromSource); this.adapter.OleDbDataAdapter.ContinueUpdateOnError = true; ! int rowsUpdated = this.adapter.OleDbDataAdapter.Update(this.downloadedValuesFromSource); ! if(rowsUpdated > 0) ! this.updateCurrentStatusDatabaseUpdated("YES"); ! else ! this.updateCurrentStatus("NOT FOUND"); } *************** *** 558,565 **** HttpWebResponse hwr; string url; ! //url = "http:" + "//ichart.yahoo.com/table.csv?a=" ! // + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"; ! url = "http:" + "//table.finance.yahoo.com/table.csv?a=" ! + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"; int numTrials = 1; while(numTrials < 5) --- 567,574 ---- HttpWebResponse hwr; string url; ! url = "http:" + "//ichart.yahoo.com/table.csv?a=" ! + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"; ! //url = "http:" + "//table.finance.yahoo.com/table.csv?a=" ! // + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"; int numTrials = 1; while(numTrials < 5) |