Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL data not being returned

Author  Topic 

mind_grapes
Yak Posting Veteran

71 Posts

Posted - 2009-06-18 : 11:24:18
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

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2009-06-18 : 11:51:07
If you are seeing all 103 rows in the dropdownlist, then you should be looking in the application code.. SQL Server is returning all the data you asked for.. but somewhere along in the app code layer the rows are getting chopped off..

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-18 : 14:21:19
it seems like problem is with the way the selected value is passed to the db for retrieving data. can you check the code to see if selected value is correctly passed to query/procedure which retrives data and also query is correctly using it. If you're using stored procedures make sure parameters are correctly passing value to query.
Go to Top of Page

mind_grapes
Yak Posting Veteran

71 Posts

Posted - 2009-06-19 : 04:16:58
quote:
Originally posted by dinakar

If you are seeing all 103 rows in the dropdownlist, then you should be looking in the application code.. SQL Server is returning all the data you asked for.. but somewhere along in the app code layer the rows are getting chopped off..

Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/



Hello dinakar, Thank you for you reply.

I'd like to preface this and all replies and say I am new to coding SQL etc, so please forgive the lack of knowledge / terminology :-)

I shall look at the application code (I'm guesing you mean the code it self) and get back to you, is there any one thing I should be looking at in particular?

Kind regards
MG
Go to Top of Page

mind_grapes
Yak Posting Veteran

71 Posts

Posted - 2009-06-19 : 04:23:32
quote:
Originally posted by visakh16

it seems like problem is with the way the selected value is passed to the db for retrieving data. can you check the code to see if selected value is correctly passed to query/procedure which retrives data and also query is correctly using it. If you're using stored procedures make sure parameters are correctly passing value to query.



Hello visakh16, thank you for the reply.

Again I would like to stress I am new to SQL and coding in general.

Im not entirely sure what it is I should be looking for, but will have a play around with the code, thanks for pointing me in the right direction, and all replies so far.

Kind regards
MG
Go to Top of Page

NeilG
Aged Yak Warrior

530 Posts

Posted - 2009-06-19 : 04:35:24
i would also just double check the stored proc code also, and make sure that there are not limitation like top 103 on the select statement.

might not be anything but some other developer may of change the stored proc it would out notifying anyone.


Go to Top of Page

mind_grapes
Yak Posting Veteran

71 Posts

Posted - 2009-06-19 : 05:26:07
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
Go to Top of Page
   

- Advertisement -