connecting to mssql and helpers