Error COBCH1710 and COBCH0826


Hello:

I am creating a new project with some programs that existed in another project (for example the menu manager).

Everything is fine, but I have an error that I can not solve (and the tips do not exist).

The program in question is MENUS (MENUS + MENUS.XAML). You are giving COBCH1710 and COBCH0826 error on some lines in MENUS.G.CBL.

I've tried changing some of the lines but it always gives the same error.

Attached prints with the error.

 

Thanks

Alberto Ferraz

 

  • Which product version are you using and which version of Visual Studio?
    Did you just create a new WPF product and then add the xaml and .cbl file from a different project to it?
    It looks like there are a couple of event handlers missing.

    Can you possibly upload your new project and source files so that I can look at it here?
  • In reply to Chris Glazier:

    Hi,
    I'm use de Visual Cobol 3.0 and Visual Studio Community 2017.

    Yes, I created a new WPF project and then added the programs I wanted to take advantage of.

    I send you a copy of the project.

    Thanks,
    Alberto Ferraz
  • In reply to Ferraz:

    I receive the same errors using Visual COBOL 4.0, even when I have stripped everything out of the project except Menus.xaml and Menus.xaml.cbl.

    It will not recognize the Click event handlers for some of the MenuItems in your class.
    When I delete the ones in error from the xaml and then add them back or change their names then it compiles without error.

    You state that this compiles without a problem in a different project? Very strange.

    I noticed that you are compiling using SQL(DBMAN=ODBC) which is not allowed as this is managed code and you should be using DBMAN=ADO but this does not appear to be causing the compiler error.

    If you open up a new support incident for this and put my name as part of the description then I will have Development take a look and see if they can identify the underlying cause of the problem.

    Thanks,
  • In reply to Chris Glazier:

    Thanks for your help.

    I do not know what the problem is. For now I removed the _click commands that were giving xaml error and stopped giving the error.
    I've been able to move a little further.
    
    Now I have a new error when I move from the LOGIN program to the MENUS.
    An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll
    Additional information: The provisioning of the value in 'System.Windows.Baml2006.TypeConverterMarkupExtension' issued an exception. ' Line number '10' and line position '175'.
    I've done a few more laps to realize why the error but I still can not solve.

     

    Regarding your comments:

    You state that this compiles without a problem in a different project? Very strange.

    Yes, it´s work fine sice any problem.

     

    I noticed that you are compiling using SQL(DBMAN=ODBC) which is not allowed as this is managed code and you should be using DBMAN=ADO but this does not appear to be causing the compiler error. 

    I'm using this directive in the other project and have never had any problems (neither in build nor in use). Access to the database works and is fast.
    At first I tried with DBMAN = ADO but could not program to use this directive.
    But as you say, that's not the problem.

     

    I'll keep trying to go a little further to get the menu program up and running.

    Thanks,

    Alberto Ferarz

  • In reply to Ferraz:

    Hi Chris,

    I was able to resolve the problem with the _click attribute.
    I was re-creating the event handlers for each field and stopped giving the error.

    The other error that was also giving is already resolved. There must have been a parameter that was not in the right sequence or anything else. I rewrote the parameters and stopped giving the error.

    So the menu program is already working. I can already start doing the following.

    Again thank you very much for the help.

    Best resgards
    Alberto Ferraz