Fixed pattern matching for valid database names

This was reversed, so it returned null if the database name is valid
Removed reference to System.Data.SqlClient

Changed parameters to use SqliteParameter instead of SqlParameter
Removed reference to System.Data.SqlClient