Adrian, What datatype is LongContent? Is it text? There used to be (and this may still be an issue) certain things you needed to consider when retrieving data from text field in a database. Something about the data coming back as a stream and causing other data to be dropped. I wish I remembered the details. When I was having the problem I wasn't using GetRows. I was just using the recordset which appears to be working find in your case.
Anyway, you can easily determine if I'm leading you down the wrong path by doing the same test without the LongContent field. Or if LongContent isn't actually going to be larger than 8000 chars you could try changing it to varchar(8000) or whatever the max size is for your DB version. Marios Alexandrou Web and Desktop Software Developer http://www.mariosalexandrou.com > -----Original Message----- > From: Adrian Hoess [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 04, 2002 3:09 AM > To: ActiveServerPages > Subject: Problem with GetRows : Never encountered this one before > > > Hi all > > This is a strange one ... > > I have opened a recordset and placed it into a local array using the > getrows method. > > i seem to have missing values in the array which are present in the > recordset. i loop through the rs, and print all the values out. no > problem. > > i then call getrows and then loop through the array to print out the > variables, and some values are missing. > > if i swap the fields around in the sql statement, additional elements in > the array dissappear, or reappear. i can never get all the values in the > recordset. > > -------------------------- > here is the code: > -------------------------- > Set objRs = Server.CreateObject("adodb.recordset") > objRS.Open strSQL, strConn , adOpenForwardOnly, > adLockReadOnly, adCmdText > > if NOT (objRS.EOF) then > while NOT objRS.EOF > response.write objRS(0) & " : " > response.write objRS(1) & " : " > response.write objRS(2) & " : " > response.write objRS(3) & " : " > response.write objRS(4) & " : " > response.write objRS(5) & " : " > response.write objRS(6) & " : <br>" > objRS.MoveNext > Wend > response.write("<br>") > > Dim arrResults > arrResults = objRS.getRows > > Dim iRowLoop, iColLoop > For iRowLoop = 0 to UBound(arrResults, 2) > For iColLoop = 0 to UBound(arrResults, 1) > Response.Write(arrResults(iColLoop, > iRowLoop) & " : ") > Next > Response.Write("<p>") > Next > . > . > . > > -------------------------- > here is the print out : > -------------------------- > > SELECT articleID, templateID, sectionID, longTitle, shortContent, > shortTitle, longContent FROM articlesLive INNER JOIN articleMeta ON > (articlesLive.articleID = articleMeta.metaID) WHERE ((statusID = 3) AND > (sectionID <> 1) AND (visible = 1)) AND (articlesLive.longContent LIKE > '%annual reports%' OR articlesLive.shortTitle LIKE '%annual reports%' OR > articlesLive.shortContent LIKE '%annual reports%' OR > articlesLive.longTitle LIKE '%annual reports%') > > 7 : 6 : 4 : long title : short content : Annual Reports : long content : > <--- RS > > 7 : 6 : 4 : long title : : : long content : <--- ARRAY > > -------------------------------- > > any ideas ?????!!!! > > Thanks > Adrian --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
