sturgerm
asked on
Are there any characters in a record set field that causes GetRows() to record the field or other fields as blanks?
In using GetRows() in an asp/vbscript page, including a field from a small record set which contains URLs, the GetRows() fails to get one or more of the other fields . Using the query below, the sueBlogWhatsHotParagraph field is blank
The SQL query is
"SELECT sueBlogWhatsHotSource, sueBlogWhatsHotParagraph, sueBlogWhatsHotUrl FROM tblSueBlogWhatsHot WHERE (sueBlogID = '"&CInt(selectedBlogID)&"' ) AND (sueBlogWhatsHotEndDate IS NULL OR sueBlogWhatsHotEndDate >= GETDATE()) ORDER BY sueBlogWhatsHotOrder"
The four URL fields are
index.asp?leftButNo=2&sele ctedTopBut ID=6&topBu tNo=3&sele ctedBlogID =23&select edBlogMont h=7&select edBlogYear =2009
http://www.waitrose.com/ourcompany/leckfordestate/leckfordfarm.aspx
http://www.fifiefofum.com/newsDetails.asp?newsID=38&newsYear=2009&newsMonth=4
http://www.fifiefofum.com/galleryArtist.asp?contactNameID=660&productCategoryID=14&topButNo=1&galleryShop=2
I have experimented by including additional fields and the resulting missing fields in the array changes with the position of the URL field in the SQL query. The URL field does appear in the array again dependent upon its position in the query.
Reloading the GetRows() array by looping through the original record set works.
The SQL query is
"SELECT sueBlogWhatsHotSource, sueBlogWhatsHotParagraph, sueBlogWhatsHotUrl FROM tblSueBlogWhatsHot WHERE (sueBlogID = '"&CInt(selectedBlogID)&"'
The four URL fields are
index.asp?leftButNo=2&sele
http://www.waitrose.com/ourcompany/leckfordestate/leckfordfarm.aspx
http://www.fifiefofum.com/newsDetails.asp?newsID=38&newsYear=2009&newsMonth=4
http://www.fifiefofum.com/galleryArtist.asp?contactNameID=660&productCategoryID=14&topButNo=1&galleryShop=2
I have experimented by including additional fields and the resulting missing fields in the array changes with the position of the URL field in the SQL query. The URL field does appear in the array again dependent upon its position in the query.
Reloading the GetRows() array by looping through the original record set works.
What database are you using and what are the data types for the columns selected?
ASKER
MSQL 2008
varchar(50), varchar(max) and varchar(max)
varchar(50), varchar(max) and varchar(max)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.