Forum Moderators: open
i have a page running a simple report from a database..
i use getrows on all my querys, but im getting a problem.
report has a field running a query with a WHERE clause on the end, but the page is falling over when i attempt to do
totalTime = totalTime + aItems(3,x)
aItems being the array returned from getrows().
problem is that the page as i said falls over on this line, saying
Type mismatch: 'aItems(...)'
if i response.write aitems(3,x) i get numbers.. for instance..
5.02
i tried using cdbl, but no luck , i even changed the query to cdbl the field before it gets 'getrowed' but then the page falls over on my little run query function on the line
arrMenuItems = oRS.getRows()
it does have a
if not (oRS.EOF and oRS.BOF) then
before it so not that ...
so anyone have any idea why this is happening, surely cdbl,cint etc should be able to be used?
any help very much appreciated as always
tia
nathan
aItems = doQuery(q)
doQuery being the function that runs the query and returns the array..
function doQuery(q)
set oRS = oConn.execute(q)if not (oRS.EOF and oRS.BOF) then
arrMenuItems = oRS.getRows()
else
arrMenuItems = null
end if
doQuery = arrMenuItems
oRS.close
set oRS = nothing
end function