The following list describes two methods to determine whether a database is ANSI compliant:
SELECT name,is_ansi FROM sysmaster:sysdatabases
The query returns the value 1 for ANSI-compliant databases and 0 for non-ANSI-compliant databases for each database on your database server.