Connects database to form.