|
-
Aug 5th, 2003, 08:01 AM
#1
Thread Starter
Fanatic Member
drop down
running
cboTerm.Items.Add(oDR.Item("Term"))
produces the error: System.IndexOutOfRangeException
ps. the field Term is an Integer field in sql server 2000.
any ideas please?
Thanks
-
Aug 5th, 2003, 08:07 AM
#2
Addicted Member
This would happen if oDR.Item("Term") does not exist
-
Aug 5th, 2003, 08:10 AM
#3
Thread Starter
Fanatic Member
drop down
Hi,
yes, it does exist because this is the query that I am using...
thanks
SELECT
DISTINCT(Term)
FROM
CDS_CurveSpreadData
ORDER BY
Term
-
Aug 5th, 2003, 08:13 AM
#4
Addicted Member
Re: drop down
So if you use:
If Not oDR.Item("Term") Is Nothing Then
cboTerm.Items.Add(oDR.Item("Term"))
End If
then this also fails?
-
Aug 5th, 2003, 08:21 AM
#5
Thread Starter
Fanatic Member
yes, that fails too.
the error again is: System.IndexOutOfRangeException
Thanks
-
Aug 5th, 2003, 08:28 AM
#6
Addicted Member
Are you perhaps adding the same item twice?
-
Aug 5th, 2003, 08:31 AM
#7
Thread Starter
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|