Solved

Are there any characters in a record set field that causes GetRows() to record the field or other fields as blanks?

Posted on 2009-07-10
3
268 Views
Last Modified: 2012-05-07
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&selectedTopButID=6&topButNo=3&selectedBlogID=23&selectedBlogMonth=7&selectedBlogYear=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.
0
Comment
Question by:sturgerm
  • 2
3 Comments
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24828821
What database are you using and what are the data types for the columns selected?
0
 

Author Comment

by:sturgerm
ID: 24829456
MSQL 2008
varchar(50), varchar(max) and varchar(max)
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 24830958
There used to be a problem with ADO and BLOB data types in that if you listed the BLOB fields first the rest of the columns would be Null.  It does not appear to be your case as you have listed them last.  The other possibility is that you are using an old provider that does not support the new data types.  Perhaps you can temporarily change the data types for the columns listed from varchar(MAX) to varchar(100)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now