def ConnectByDSN(self, dsn, user, passwd = ''):
        self.dsn = dsn
        self.user = user
        self.passwd = passwd

        sn = create_buffer(dsn)
        un = create_buffer(user)        
        pw = create_buffer(passwd)
        
        ret = ODBC_API.SQLConnect(self.dbc_h, sn, len(sn), un, len(un), pw, len(pw))
        check_success(self, ret)

        self.update_db_special_info()
        self.connected = 1
Connect to odbc, we need dsn, user and optionally password
dataset/ETHPy150Open harryliu/edwin/edwinServer/site_packages/pypyodbc.py/Connection.ConnectByDSN