Search code examples
sql-serverdelphidelphi-2010

"fetch type out of range" error message throwing


While executing the following code szNotes := SQL.FieldByName('Notes').AsString; throwing an "fetch type out of range" error message. I'm using SQL Server DB, the field type is VARCHAR(MAX). How to resolve this issue, please guide me.


Solution

  • try to use szNotes := SQL.FieldByName('Notes').AsWideString;