[thelist] GetRows goofiness (or my own)
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Mon Oct 2 13:05:38 CDT 2006
Just to clarify... DESCRIPT is a text field (as opposed to varchar)? If so, you may have to place it last in the query; I've heard of this happening with text fields in SQL Server (or Memo fields in Access), but that was a long time ago...
SELECT WO_NUM, REQDATE, TYPE, TASK, NOTE, DESCRIPT
Peter
From: "Canfield, Joel" JCanfield at PacAdvantage.org
I have a query which in MSSQL's query analyzer returns exactly the
results I expect. I have an ASP page on our intranet where run the
query, then use GetRows on the results set.
Can anyone see why, no matter what I do, item 4 (the one numbered '4,i',
not the fourth item) in this is blank, every time for every query?
With Response
.Write("" & vbCrLf & vbCrLf)
.Write("" & aryExactResultsList(0,i) & " " & vbCrLf)
.Write("" & aryExactResultsList(1,i) & " " & vbCrLf)
.Write("" & aryExactResultsList(2,i) & " " & vbCrLf)
.Write("" & aryExactResultsList(3,i) & " " & vbCrLf)
.Write("" & aryExactResultsList(4,i) & " " & vbCrLf)
.Write("" & aryExactResultsList(5,i) & " " & vbCrLf)
.Write("
" & vbCrLf & vbCrLf)
End With
++++++++++++++++++
Here's the full section of code in all its glory:
strQuery = "select WO_NUM, REQDATE, TYPE, TASK, DESCRIPT, NOTE from
TASKS where " & strTypeForSearch & strRequestor & strDateRange & "
((TASK like '%" & arySearchTerms(0) & "%'" &
strAdditionalSearchTermsTask & ") or (DESCRIPT like '%" &
arySearchTerms(0) & "%'" & strAdditionalSearchTermsDescript & ") or
(NOTE like '%" & arySearchTerms(0) & "%'" & strAdditionalSearchTermsNote
& ")) order by WO_NUM desc"
response.write(strQuery)
Set ExactResultsList = cnxW.Execute(strQuery)
If Not(ExactResultsList.BOF And ExactResultsList.EOF) Then
aryExactResultsList = ExactResultsList.GetRows
Set ExactResultsList = Nothing
Response.Write("
Exact Matches")
Response.Write("
")
Response.Write("
WO#Req.
DateTypeSummaryDescriptionUpdates>
" & vbCrLf)
For i = 0 to UBound(aryExactResultsList,2)
With Response
.Write("
" & vbCrLf & vbCrLf)
.Write("
" & aryExactResultsList(0,i) &
" " & vbCrLf)
.Write("
" & aryExactResultsList(1,i) &
" " & vbCrLf)
.Write("
" & aryExactResultsList(2,i) &
" " & vbCrLf)
.Write("
" & aryExactResultsList(3,i) &
" " & vbCrLf)
.Write("
" & aryExactResultsList(4,i) &
" " & vbCrLf)
.Write("
" & aryExactResultsList(5,i) &
" " & vbCrLf)
.Write("
" & vbCrLf & vbCrLf)
End With
Next
Response.Write("
")
End If
The query as spewed to the page is
select WO_NUM, REQDATE, TYPE, TASK, DESCRIPT, NOTE from TASKS where
REQDATE between '2004-01-01' and '2006-09-30' and ((TASK like
'%joecanfi%' And TASK like '%micmarti%' And TASK like '%pactrac%' ) or
(DESCRIPT like '%joecanfi%' And DESCRIPT like '%micmarti%' And DESCRIPT
like '%pactrac%' ) or (NOTE like '%joecanfi%' And NOTE like '%micmarti%'
And NOTE like '%pactrac%' )) order by WO_NUM desc
The contents returned for the DESCRIPT field [which I sincerely hope is
aryExactResultsList(4,i)] are plain text, nothing unusual or surprising.
I have eleventyleven web tools accessing this data, so I'm fairly sure
it's not the data.
Thanks.
joel
--
* * Please support the community that supports you. * *
http://evolt.org/help_support_evolt/
For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !
More information about the thelist
mailing list