def __init__(self,adoField):
        """Get name and type information from adoField"""
        self.name = None
        self.adoType = None
        self.adoLen = None
        self.sqlString = None # For sql create table

        if adoField.Type == win32com.client.constants.adInteger:
            self.name = adoField.Name
            self.adoType = adoField.Type # 3
            self.adoLen = adoField.DefinedSize
            self.sqlString = 'integer'
            return
        if adoField.Type == win32com.client.constants.adCurrency:
            self.name = adoField.Name
            self.adoType = adoField.Type # 6
            self.adoLen = adoField.DefinedSize
            self.sqlString = 'money'
            return
        if adoField.Type == win32com.client.constants.adDate:
            self.name = adoField.Name
            self.adoType = adoField.Type # 7
            self.adoLen = adoField.DefinedSize
            self.sqlString = 'timestamp'
            return
        if adoField.Type == win32com.client.constants.adBoolean:
            self.name = adoField.Name
            self.adoType = adoField.Type # 11
            self.adoLen = adoField.DefinedSize
            self.sqlString = 'boolean'
            return
        if adoField.Type == win32com.client.constants.adDBTimeStamp:
            self.name = adoField.Name
            self.adoType = adoField.Type # 135
            self.adoLen = adoField.DefinedSize
            self.sqlString = 'timestamp'
            return
        if adoField.Type == win32com.client.constants.adVarWChar:
            self.name = adoField.Name
            self.adoType = adoField.Type # 202
            self.adoLen = adoField.DefinedSize
            self.sqlString = 'varchar(%d)' % self.adoLen
            return
        if adoField.Type == win32com.client.constants.adLongVarWChar:
            self.name = adoField.Name
            self.adoType = adoField.Type # 203
            self.adoLen = adoField.DefinedSize
            self.sqlString = 'text'
            return
        raise "unrecognized ado field type %d" % adoField.Type
Get name and type information from adoField
recipes/Python/104801_Use_ADO_list_field_definitions/recipe-104801.py