static method

I am working with winforms and in the file section I have a file that needs to be accessed from a static method.  I get the following error message on fields that are associated with that file...error code COBCH0969, Cannot access object data from a static method or field.    In order to fix these compile errors I put the keyword static on the FD of the file.  When I run the program in this way I get a runtime error of NullRefernceException -- object reference not set to an instance of an object. 

Now I realize that I could make the method as public and my problems would go away, but I really don't want to have to do this.  How can I resolve this issue?  Thanks

Tags:

Parents
  • No, a co-worker has pretty much the same software installed on his pc as mine and he IS having issues.  He is running win 7 sp1 with vs 2010 shell and visual cobol 2.2.  I will un-install the software as you suggested and get back to you. 

    One more thing in my previous post I asked if you knew how to get that error message to return as I accidently clicked for it to not return (that is what you get when you get into a hurry).  Thanks

Reply
  • No, a co-worker has pretty much the same software installed on his pc as mine and he IS having issues.  He is running win 7 sp1 with vs 2010 shell and visual cobol 2.2.  I will un-install the software as you suggested and get back to you. 

    One more thing in my previous post I asked if you knew how to get that error message to return as I accidently clicked for it to not return (that is what you get when you get into a hurry).  Thanks

Children
No Data