First of all the statement
$qry->FetchRow()
should return true if a row was fetched. This should be checked before the call to
$qry->Data('agreement.Field2')
note that the query just may be failing to find any matches.
To check ODBC itself, on Windows boxes go to Control Panel and select the ODBC applet. There you will find the option to turn on tracing. The trace file, sql.log, is usually generated in the root directory of your system drive. Make sure to turn tracing off when finished because it will slow down your machine big time.