I've got the solution by myself, even if it's not as straightforward as I've supposed.
My database name is wtrade.
In order to test it, I opened the database explorer of matlab and I've created a new connection. I called this connection wtrade as well.
When I call the database function in order to get the connection, the inner code at first look if there's a connection with the name that I give with first argument, and if not it goes ahead. Since I had a connection named the same way as the database, it started the initialization code of following signature:
conn = database(datasource,username,password)
instead of this one
conn = database(databasename,username,password,driver,url)
since datasource and databasename were the same.
The first signature accept name values pairs Name, value, and since driver value is not one of accepted parameter values of course, like "Name" or "Vendor" (check database documentation for this), I got the error, that says clearly (now) that the string in "driver" position is not the name of an accepted parameter like "Name" or "Vendor"
In order to solve it I've deleted the connection that I've created with database explorer and it works. My opinion anyway is that's a bug, since it's normal and not forbidden to have a datasource with the same name of the database.