I'm refactoring an existing Delphi VCL application, migrating the underlying DB from Access 97 (!!) to SQL Server 2014. In the process, we decided for a table to change some field definitions, in particular we changed the field 'Ora' type from DateTime to int.
I have a TADOQuery on the form, that simply does
SELECT * FROM Carichi
After changing the 'Carichi' table definition, I deleted all the Fields from the TADOQuery and ran "Add Fields" to add refreshed fields. Now I can see the 'Ora' Field is a TIntegerField.
But when I run the form, the following exception appears:
06/03/2018 11:00:56:qcarichi: Type mismatch for field 'ora', expecting: Integer actual: DateTime:
It looks like somewhere the old field type is kept and checked for.
I also tried to completely delete the TADOQuery object from the form and re-insert it from scratch.... no way.... Any suggestions ?