connecting to DB for intsert query