Using conn As New SqlConnection(ConnectionString) Dim cmd As New SqlCommand cmd.CommandText = StoredProcedureName cmd.CommandType = CommandType.StoredProcedure cmd.Connection = conn cmd.Parameters.AddRange(params) conn.Open() Dim reader As SqlDataReader = cmd.ExecuteReader() While reader.Read msLocationName = reader("LocationName") miLocationID = reader("LocationID") End While reader.Close() reader = Nothing conn.Close() End Using