1 Reply Latest reply: May 19, 2008 6:08 AM by 807581 RSS

    FetchCursor OpenCursor issue with nchar and nvarchar

    807581
      Hi,
      I am using UDS 5.2.14 connecting to MS SQL 2000.
      I needed to change one of my database column to nchar (or nvarchar) to allow Unicode to be added.
      But that is making FetchCursor fail with the message:
      "FetchCursor failed for dynamic SQL statement 19, error from database is:
      Cannot convert result column 11 from an ODBC value to any Forte data class."

      The column 11 is the nvarchar column and I can tell from the properties that DataType and DBDataType both are empty when originally the OpenCursor was executed.
      I understand from this that Forte/UDS cannot find a class for the nvarchar neither the nchar columns, can anyone help please here?
      Thanks
        • 1. Re: FetchCursor OpenCursor issue with nchar and nvarchar
          807581
          The quick (and dirty) fix would be to add a non persistent computed column for each nvarchar by recasting the data to something supported by the fort´┐Ż ODBC wrapper, varchar or binary. Have a look at "CAST ( expression AS data_type )"

          insert should be fine using the initial columns, the dodgy part may be the select for update.

          Otherwise write a mini C lib to be used to bind those data types for a couple of given SQL requests. Or use informix.