Modified database connection process
Fix compile issue
Added connect dependency