Forum Discussion

juliemorris's avatar
juliemorris
Occasional Contributor
3 years ago

A nvarchar(max) column returns as "(WIDEMEMO)" when queried using an ADOQuery on an SQL database

I am querying an SQL database using an ADOQuery, passing in an SQL query statement and returning a result. When the query uses a SQL column with a type of nvarchar(max), I get (WIDEMEMO) returned ra...
  • juliemorris's avatar
    3 years ago

    Solved it myself.

    Just cast the field in the SQL statement...

    SELECT LineNumber, CAST([ProductId] AS nvarchar(50)) AS ProductId FROM Orders WHERE orderNum = :Param_1;