Highlighted
New Member.
1776 views

COBCH0898: Ambiguous match for method Error when loading SQL parameters.

Jump to solution

I am getting the above error with Visual COBOL 2.0 that I didn't get with Visual COBOL R4. What am I missing?

Here's the line of code:

invoke cmd::Parameters::AddWithValue("@comm_term_vesting_pct", Convert::ToDecimal(comm-term-vesting-pct))

where comm-term-vesting-pct is defined as Pic 9(9)V9(2) COMP-3.

The error occurs whenever I try to convert to anything other than an interger or string.

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Hi Noj, this looks like a bug in the compiler, we've raised an incident which we'll address in a coming release.

In the interim, could you see if this is an acceptable workaround for you:

      01 comm-term-vesting-pct Pic 9(9)V9(2) COMP-3.

      01 d decimal.

      procedure division.

          set d to comm-term-vesting-pct

          INVOKE cmd::AddWithValue("@comm_term_vesting_pct", d)

Regards, Scot

View solution in original post

0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

Hi Noj, this looks like a bug in the compiler, we've raised an incident which we'll address in a coming release.

In the interim, could you see if this is an acceptable workaround for you:

      01 comm-term-vesting-pct Pic 9(9)V9(2) COMP-3.

      01 d decimal.

      procedure division.

          set d to comm-term-vesting-pct

          INVOKE cmd::AddWithValue("@comm_term_vesting_pct", d)

Regards, Scot

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.