Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

26.1.17. MyODBC Data Types

The following table illustrates how driver maps the server data types to default SQL and C data types:

Native Value SQL Type C Type
bit SQL_BIT SQL_C_BIT
tinyint SQL_TINYINT SQL_C_STINYINT
tinyint unsigned SQL_TINYINT SQL_C_UTINYINT
bigint SQL_BIGINT SQL_C_SBIGINT
bigint unsigned SQL_BIGINT SQL_C_UBIGINT
long varbinary SQL_LONGVARBINARY SQL_C_BINARY
blob SQL_LONGVARBINARY SQL_C_BINARY
longblob SQL_LONGVARBINARY SQL_C_BINARY
tinyblob SQL_LONGVARBINARY SQL_C_BINARY
mediumblob SQL_LONGVARBINARY SQL_C_BINARY
long varchar SQL_LONGVARCHAR SQL_C_CHAR
text SQL_LONGVARCHAR SQL_C_CHAR
mediumtext SQL_LONGVARCHAR SQL_C_CHAR
char SQL_CHAR SQL_C_CHAR
numeric SQL_NUMERIC SQL_C_CHAR
decimal SQL_DECIMAL SQL_C_CHAR
integer SQL_INTEGER SQL_C_SLONG
integer unsigned SQL_INTEGER SQL_C_ULONG
int SQL_INTEGER SQL_C_SLONG
int unsigned SQL_INTEGER SQL_C_ULONG
mediumint SQL_INTEGER SQL_C_SLONG
mediumint unsigned SQL_INTEGER SQL_C_ULONG
smallint SQL_SMALLINT SQL_C_SSHORT
smallint unsigned SQL_SMALLINT SQL_C_USHORT
real SQL_FLOAT SQL_C_DOUBLE
double SQL_FLOAT SQL_C_DOUBLE
float SQL_REAL SQL_C_FLOAT
double precision SQL_DOUBLE SQL_C_DOUBLE
date SQL_DATE SQL_C_DATE
time SQL_TIME SQL_C_TIME
year SQL_SMALLINT SQL_C_SHORT
datetime SQL_TIMESTAMP SQL_C_TIMESTAMP
timestamp SQL_TIMESTAMP SQL_C_TIMESTAMP
text SQL_VARCHAR SQL_C_CHAR
varchar SQL_VARCHAR SQL_C_CHAR
enum SQL_VARCHAR SQL_C_CHAR
set SQL_VARCHAR SQL_C_CHAR
bit SQL_CHAR SQL_C_CHAR
bool SQL_CHAR SQL_C_CHAR

 
 
  Published under the terms of the GNU General Public License Design by Interspire