def buildConnectionString(params):
    """Build a connection string from a dictionary
    
    Returns string.
    """
    return ";".join(["%s=%s" % (k, params[k]) for k in params.keys()])

if __name__ == "__main__":
    myParams = {"server":"mpilgrim", \
                "database":"master", \
                "uid":"sa", \
                "pwd":"secret"
                }
    print buildConnectionString(myParams)
