Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tabular Data Control - intermittantly returns data

Status
Not open for further replies.

fergusor

Programmer
May 22, 2000
1
GB
I have a novel, if not unconventional, use for this control. Instead of the DataURL property pointing to a static file as all the examples I've seen cite, it points to a CGI&nbsp;&nbsp;script on an IIS server with a CGI &quot;query_string&quot; being passed in the URL. The DataURL property is dynamically set, the CGI script takes the query_string argument and forms a SQL statement that the script fires at a SQLServer. The SQLServer then returns a varible number of TDC complient rows, obviously, dependant on the WHERE clause. Great, this works fine!<br><br>However: Along comes Office2000 SR1. Since applying SR1, the control now *intermittantly* returns data. More *not* than often. It also exibits an in-between state, where with BORDER=1 set on the table so you can see it, the table will grow to a random 2-D dimension with no content. If you take the text result of the CGI query and put it in a file, re-point the DataURL to this file, it works perfectly again.&nbsp;&nbsp;&nbsp;<br><br>Looking at the TDC source on MSDN, my attention was drawn to this function:<br><br><br>/ GetEstimatedRows..&nbsp;&nbsp;<br>// We should really see if URLMon has a means of giving a byte count on the file <br>// we're downloading.&nbsp;&nbsp;For now though.. <br>STDMETHODIMP <br>CTDCArr::getEstimatedRows(LONG *pcRows) <br>{ <br>&nbsp;&nbsp;&nbsp;&nbsp;*pcRows = m_iFilterRows; <br>&nbsp;&nbsp;&nbsp;&nbsp;if (m_state&lt;LS_LOADED) <br>&nbsp;&nbsp;&nbsp;&nbsp;{ <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Return twice number of rows, but be careful not to return 2 * 0. <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*pcRows = m_iFilterRows ? m_iFilterRows * 2 : -1; <br>&nbsp;&nbsp;&nbsp;&nbsp;} <br>&nbsp;&nbsp;&nbsp;&nbsp;return S_OK; <br>}<br><br><br>Supicion lies with the initial comment. The URLMon API *has* a &quot;progress function&quot; that uses the 'content-length' http header to determine progress. Cleary this source is not using it. On a hunce, I then changed the CGI script to calculate the, what was previously absent &quot;content-length&quot; in the http header. This made the query noticebly more reliable. An improvement, but not 100%<br><br>I realise the TDC source is over a year old and I am only speculating. <br><br>I have researched this problem for nearly a month just to get to this semi-conclusion.<br><br>Have additionaly expermiented with various http header combinations<br><br>&nbsp;&nbsp;&nbsp;cache-control: private<br>&nbsp;&nbsp;&nbsp;expires: -1<br><br>Has anybody seen similar symptoms to this or got any clues!!!!<br><br><br>thanks<br>&nbsp;-Ross Ferguson<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top