The following table describes the supported ASE data types and their mapping to the Python data types. The type codes returned in the description
cursor attribute can be used in the addtypecast()
cursor method.
ASE data type | Type code | Python data type |
---|---|---|
char |
701 |
str |
unichar |
702 |
str |
varchar |
703 |
str |
univarchar |
704 |
str |
text |
721 |
str |
unitext |
722 |
str |
nchar |
751 |
str |
nvarchar |
752 |
str |
smallint |
705 |
int |
tinyint |
706 |
int |
int |
707 |
int |
bigint |
708 |
int |
unsigned smallint |
724 |
int |
unsigned int |
725 |
int |
unsigned bigint |
726 |
int |
decimal |
709 |
float |
float |
710 |
float |
real |
712 |
float |
numeric |
713 |
float |
money |
753 |
float |
smallmoney |
754 |
float |
bit |
717 |
bool |
binary |
718 |
bytes |
varbinary |
719 |
bytes |
image |
720 |
bytes |
date |
714 |
datetime.date |
time |
715 |
datetime.time |
datetime |
716 |
datetime.datetime |
smalldatetime |
755 |
datetime.datetime |