An unhandled exception of type 'System.InvalidCastException' occurred in system.windows.forms.dll

  • Thread starter Thread starter Ben
  • Start date Start date
B

Ben

Hi

I have a program that has just been developed on a machine running VS .NET
2003, we installed VS6 on the same machine and now we receive the below
error on click event.

The on click event doesent even seem to fire?

An unhandled exception of type 'System.InvalidCastException' occurred in
system.windows.forms.dll

Additional information: Operator is not valid for type 'DBNull' and
'Nothing'

Any help would be much appreciated

Thanks
B
 
Ben said:
Hi

I have a program that has just been developed on a machine running VS .NET
2003, we installed VS6 on the same machine and now we receive the below
error on click event.

The on click event doesent even seem to fire?

An unhandled exception of type 'System.InvalidCastException' occurred in
system.windows.forms.dll

Additional information: Operator is not valid for type 'DBNull' and
'Nothing'

Any help would be much appreciated

Thanks
B

I would bet you are reading data from a database. One field you are
pulling from the database is set to null and you are trying to do some
operation on it.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top