Further to earlier messages re ole/excel problems, I have a strange related issue with 6.5
We have a script library in a database which uses an odbcresultset to populate an excel spreadsheet.
This worked perfectly under Notes 5.
The odbcresultset is created and executed in one subroutine, the data rows read and written to a text file on the client. Another then creates an ole excel sheet and imports the text file (this was much quicker than using ole calls to fill the sheet from the data rows one cell at a time).
Another routine uses the odbcresultset fieldname property to put column headings in the sheet.
However, the column headings are coming up blank. I checked the routine using msgbox as follows…(qry_result is my odbcresulset variable)
For i = 1 To columns
Msgbox qry_result.fieldname(i)
Call wsCurrentcell(qry_result.fieldname(i))
(wsCurrentCell is from my excel library of calls now on sandbox as ‘wslib’)
The msgbox now is blank, so somehow it is losing the values in fieldname(n)
However, if I put something before the loop, e.g.
Msgbox Cstr(qry_result.cachelimit)
For i = 1 To columns
Msgbox qry_result.fieldname(i)
Call wsCurrentcell(qry_result.fieldname(i))
The cachelimit AND the column names are now displayed correctly and the cells populated with the values.
Go figure!!!
I can’t find anything related to this in the forum, and it is happening with a number of different v6 (6.01 and 6.5 at least).
Is it somehow losing a pointer to the odbcresultset between subroutines?
This is very worrying as it undermines the reliability of a number of our systems (maybe data rows are being lost as well!).
Anyone any ideas?
HELP!!!
Thanx