Form Error WCLRRTS

In my very basic solution under Visual COBOL Personal Edition 2.2, I am getting the below error message when I try to view my form's design:

To prevent possible data loss before loading the designer, the following errors must be resolved:
The variable 'WCLRRTS' is either undeclared or was never assigned.

I have did a find on my entire project and can find NO reference to this variable at all.  If I chose to ignore it, it always eventually shows back up.  My Visual Studio 2010 Professional is working fine as I use it almost daily as a programmer for my employer.  This is the strangest thing I've ever seen.  Prior to this, I got this error when I added another form and then deleted it from the project / solution.  I ended up deleting that project off of my hard drive and starting all over again.  Now I'm back to this error once more.  What is this in reference to?  I did not create it as far as I know.  Perhaps some process in the background created it.  The problem is that it says it's a variable.  If it is, then where is the code where it exists.  All of the code including the form's design CBL is no more than 150 to 200 lines long.  I'm confused yet again.

  • I know this well, not sure why I get it. However, I get it in some programs where there is no embedded SQL but have SQL compile directives set.

  • I know this well, not sure why I get it. However, I get it in some programs where there is no embedded SQL but have SQL compile directives set.

  • I googled WCLRRTS and got this link:

    "TESTSQLSTATE: Instructs OpenESQL to generate code that tests SQLSTATE rather than SQLCODE after an SQL statement is executed."

    TESTSQLSTATE/NOTESTSQLSTATE is an SQL Compiler Directive Option - used at compile time

    It is about using the option TESTSQLSTATE and from reading the documentation at the above link, I would put the NOTESTSQLSTATE option into your compilation (or set it as a permanent setting) and try again, and expect that the WCLRRTS code will not be generated again

    The documentation also states that the default is NOTESTSQLSTATE so something at your end must have set things to TESTSQLSTATE somewhere along the line 

  • Verified Answer

    This error message is caused by a product bug and it has been fixed in V2.2 update 2 hotfix 2 or higher.

    If you have a licensed copy of Visual COBOL you can request the current hotfix through Customer Care.

    Unfortunately, the Visual COBOL PE product is not at this product level so the fix is not available yet.

    The error is caused by turning on the SQL directive in a project that contains Windows Forms. Because this turns on the SQL processing for all programs in the project including the ones generated by the designer this causes the problem.

    A workaround would be to move all of your programs containing embedded SQL to a separate Class Library project and then invoke or call this code from the WinForms project, thus eliminating the need to have the SQL directive on in the WinForms project.

    You could also try turning off the SQL directive at the project level and turning it on at the program level only in programs containing actual EXEC SQL statements using $SET SQL(DBMAN=ADO) or turn off SQL using $SET NOSQL at the top of your designer files.

    I would recommend the approach of moving all of your data access SQL programs into a separate class project as this helps to isolate the UI layer from the data layer and makes the application much cleaner and easier to maintain.