Create connection based on adapter