While you may have a perfectly good DSN connection, the above error may occur when attempting to connect using a web server.
This is probably due to permissions on the database file. The web server may well be running as a user who has severely restricted permissions.
The solution is to change the database entry in the DSN to specify a remote connection, as described in "How do I connect to a remote server via TCP?" This will cause the connection to the database to be made as the user the InterBase/Firebird server is running as. This user will have the required permissions.