Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2009
    Location
    Midlands
    Posts
    135

    Unanswered: SQL data not being displayed

    Hello all, thanks for checking out this post.

    I seem to have a problem with some data in SQL 2000, data which is being presented to the user in a drop down menu in my program with the aid of stored procedures (which gets the info from the database), ASP and VBScript.

    In the database there are 103 rows of information, and these rows can all be seen in the drop down menu. However, from 100 through to 103 they are not being displayed to the screen when they are selected by the user. So, select row "99" and press "submit" and the information is displayed to the screen, but this is not the case for 100-103, all you get is a blank screen.

    Hope i have explained myself properly, if not please shout.

    Any ideas as to why this may be happening / point me in the right direction would be greatly appreciated.

    Kind regards
    Mind_grapes

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    At first guess, I suspect you have a 2 character variable (char(2), or varchar(2)) somewhere in the system that is truncating the 3 character codes for items 100 - 103.

  3. #3
    Join Date
    Jun 2009
    Location
    Midlands
    Posts
    135
    Hello MCrowley, thank you for the quick reply,

    I shall look into and get back to you shortly.

    kind regards
    MG

  4. #4
    Join Date
    Jun 2009
    Location
    Midlands
    Posts
    135
    Hi MCrowley, just getting back to you as I said I would.

    I checked the design of all the tables and I cant see any 2 character variables.

    Also, I also checked the stored procedures parameters just incase (wasn't sure if they'd have an affect, but thought it would be prudent)

    Thank you for all replies thus far

    Kind regards
    MG

  5. #5
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    Is there a TOP 100 somewhere in your SP-code or a limit to the first 100 records in your development environment??
    With kind regards . . . . . SQL Server 2000/2005/2012
    Wim

    Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2.
    Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages

  6. #6
    Join Date
    Jun 2009
    Location
    Midlands
    Posts
    135
    Hello All,

    Just to let you all know the problem has been sorted.

    It was due to an error within a function that checked for null values, it was set to 99 and so didnt display anything beyond that (it has now been changed).

    The code was:
    Function checkValue (rawData)
    if isNull(rawData) Then rawData = 0
    if Len(Trim(rawData)) = 0 then rawData = 0
    if NOT IsNumeric(rawData) Then rawData = 0
    if rawData < 0 or rawData > 99 then rawData = 0

    checkValue = rawData
    End function

    Thank you for all your post, and help in working to resolve the issue, much appreciated.

    Kind regards
    MG

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •