Application Error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a very simpel application that fills a datagrid with data from a SQL
Server on a local network. The problem is that on one PC the application
loads fine, but on the other I get NullReferenceException in my FormLoad
Event. The connection on the failing application has a valid and working
connection to Server and I checked that the builds were the same. Does
anyone have any ideas or hints.
 
Are you positive that this is PC dependant? Have you tried other combinations.
I would think that this type of message is data driven, meaning that
whatever in the database is Null causing error. Example if you try to
populate a control with a value that is Null, and do not check for Null
first, then it will error. So if you are trying to populate a datagrid and
Nulls are in the data and not allowed. A datatype thing. I've found that
checking for nulls is a pain and sometimes easier to just "saving" blank data
instead.

hope that helps.
 
Thanks for the reply Chris. I have had this problem with other PCs. Three
out of the five PCs have installed and operated without any failure, but two
once installed had the same problem. The datagrid is filled with a query
equivalent to (SELECT *) , and there are no fields that have nulls, so I am
still baffled. Sometimes, the error that is returned refers the scrollbar
position. I can't remember the error exactly, but it had to do with the
position not being equal to "-1". I do not do anything that I can think of
that would cause that problem, especially since this is an isolated case on
only 2 PCs. Any other Ideas???
 
Back
Top