Invalid cast when trying to reference a database column...
- From: "chance" <chance@xxxxxxxxxxx>
- Date: 26 Mar 2007 09:44:33 -0700
Getting and error on this first line of code:
//inspector phone
theField = reader.GetString(20);
builder.MoveToBookmark("inspector_phone");
builder.Write(theField);
the first line is crashing my program. it complains about an invalid
cast. i don't understand why though. I tried putting a IsDBNull around
it (thinking the data might be null) but that does not seem to help.
the field is declared as a string and reader is a connection to my
Oracle database.
Any help appreciated.
.
- Follow-Ups:
- Re: Invalid cast when trying to reference a database column...
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Invalid cast when trying to reference a database column...
- From: PS
- Re: Invalid cast when trying to reference a database column...
- From: Nicholas Paldino [.NET/C# MVP]
- Re: Invalid cast when trying to reference a database column...
- Prev by Date: Re: SuspendLayout Not Suspending...
- Next by Date: Re: What is a .vcproj?
- Previous by thread: Click event + key pressed
- Next by thread: Re: Invalid cast when trying to reference a database column...
- Index(es):
Relevant Pages
|