implmentation for connection to sql server