Compiler catches warning really late
- From: "Cirene" <cirene@xxxxxxxxxxx>
- Date: Wed, 28 May 2008 10:26:31 -0400
I wrote some code 2 days ago. It consisted of doing a SELECT CASE statement
using a sqldatareader...
Dim dr2 As SqlDataReader = MyCommand2.ExecuteReader
While dr2.Read()
Select Case dr2("AttachmentType")
My code compiles and runs fine for several days. Today I am writing code IN
A DIFFERENT PAGE and when I go to run it, all of a sudden, I get a failed
build. It tells me: "warning BC42036: Operands of type Object used in
expressions for 'Select', 'Case' statements; runtime errors could occur."
2 questions:
1. Why did the compiler wait for so long to tell me? I haven't touched
this code in 2 days!
2. How do you recommend I overcome this issue?
Thanks!
.
- Follow-Ups:
- Re: Compiler catches warning really late
- From: Cirene
- Re: Compiler catches warning really late
- Prev by Date: Re: How filter dropdownlist data
- Next by Date: Re: Compiler catches warning really late
- Previous by thread: webpage has expired after file upload
- Next by thread: Re: Compiler catches warning really late
- Index(es):