ListView with WPF in Visual Cobol

Hello:

I am a new member and i try use a listview in a program.

I've seen many examples but I haven't been able to put any working. I have always a problem.

The las problem is an incompatibility with de SETTER and GETTER use with a $SET SQL(ODBC=DBMAN). When i can put the listview working i add the directive $SET SQL(ODBC=DBMAN) and the complier send me the error "Error 3 COBCH0002 : Undefined ECM error. Inform Technical Support. Error code 12"

If anyone can send me a simple complete example would really help.

I wont tu use de listview with a MySql database.

Thanks.

Parents
  • Verified Answer

    The SQL directive that you are using is invalid as it should be $SET SQL(DBMAN=ADO) for managed code .NET applications and not ODBC (you also have the directive/value in wrong order)

    For MySQL you cannot use the ADO Connection Editor to create a named connection because the MySQL provider does not return information in the format that we require.

    You can however connect to the ADO provider using a connect string.

    Example:

    exec sql

      connect using

    "Server=localhost;Database=ConnectCOBOL;Uid=chris;Pwd=password;factory=MySql.Data.MySqlClient;"

    end-exec

Reply
  • Verified Answer

    The SQL directive that you are using is invalid as it should be $SET SQL(DBMAN=ADO) for managed code .NET applications and not ODBC (you also have the directive/value in wrong order)

    For MySQL you cannot use the ADO Connection Editor to create a named connection because the MySQL provider does not return information in the format that we require.

    You can however connect to the ADO provider using a connect string.

    Example:

    exec sql

      connect using

    "Server=localhost;Database=ConnectCOBOL;Uid=chris;Pwd=password;factory=MySql.Data.MySqlClient;"

    end-exec

Children
No Data