Conversion error using euro symbol (€) in IBM UDB .Net

1.2k views Asked by At

I'm getting a conversion problem using the euro symbol (€) in a input parameter from a stored procedure. This is the code I'm using:

Dim _command As New iDB2Command
p = New iDB2Parameter
p.Direction = ParameterDirection.Input
p.iDB2DbType = iDB2DbType.iDB2VarChar
p.ParameterName = "@TXT_VALUE"
p.iDB2Value = "I have 100€."
_command.Parameters.Add(p)

The detailed error is:

IBM.Data.DB2.iSeries.iDB2ConversionException
Message: A conversion error occurred.
MessageCode: 6107
MessageDetails: Parameter: 4.

The SQL code is blank (exception occurs before executing command).

Enviroment:

  • Windows 7, VS2010 & .Net 4.0 framework
  • IBM DB2 for i .NET Provider (13.0.0.2 - V7R1M0)

Regards!

1

There are 1 answers

0
CRPence On BEST ANSWER

Re-create the procedure, having defined that input parameter explicitly, with a CCSID that has support for the euro symbol; i.e. do not allow the CCSID attribute for the character string parameter to default to what is probably an EBCDIC CCSID for which the euro system is not represented.