15 #define TYPE_C(s) {s, #s, FLAG_C }
16 #define TYPE_SQL(s) {s, #s, FLAG_SQL }
17 #define TYPE_BOTH(s,s2) {s, #s, FLAG_SQL|FLAG_C }
92 fprintf(stderr,
"Check failed: %s\n",
msg);
97 main(
int argc,
char **argv)
128 printf(
"Setted type %s -> [%d (%s), %d (%s), %d]\n",
137 fprintf(stderr,
"Error setting type %d (%s)\n", (
int) p->
type, p->
name);
139 concise_type = p->
type;
147 printf(
"Setted type %s -> [%d (%s), %d (%s), %d]\n",
173 printf(
"Setted type %s -> [%d (%s), %d (%s), %d]\n",
177 fprintf(stderr,
"Error setting type %d (%s)\n", (
int) p->
type, p->
name);
static SQLRETURN odbc_connect(TDS_DBC *dbc, TDSLOGIN *login)
int odbc_disconnect(void)
static const struct type types[]
int main(int argc, char **argv)
static const char * get_type_name(SQLSMALLINT type)
static void check_msg(int check, const char *msg)
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
SQLRETURN SQLGetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
#define SQL_ATTR_APP_PARAM_DESC
#define SQL_ATTR_IMP_PARAM_DESC
#define SQL_DESC_DATETIME_INTERVAL_CODE
#define SQL_TYPE_TIMESTAMP
SQLRETURN SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength)
#define SQL_SUCCEEDED(rc)
SQLRETURN SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength)
#define SQL_C_INTERVAL_MONTH
#define SQL_C_INTERVAL_SECOND
#define SQL_C_INTERVAL_HOUR
#define SQL_C_INTERVAL_DAY
#define SQL_C_TYPE_TIMESTAMP
SQLRETURN SQLBindParameter(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType, SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLUINTEGER cbColDef, SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLINTEGER cbValueMax, SQLINTEGER *pcbValue)
#define SQL_C_INTERVAL_MINUTE
#define SQL_LONGVARBINARY
#define SQL_C_INTERVAL_HOUR_TO_SECOND
#define SQL_DESC_CONCISE_TYPE
#define SQL_C_INTERVAL_YEAR_TO_MONTH
#define SQL_C_INTERVAL_HOUR_TO_MINUTE
#define SQL_C_INTERVAL_YEAR
#define SQL_C_INTERVAL_DAY_TO_MINUTE
#define SQL_C_INTERVAL_DAY_TO_SECOND
#define SQL_C_INTERVAL_MINUTE_TO_SECOND
#define SQL_C_INTERVAL_DAY_TO_HOUR
unsigned long SQLUINTEGER
signed short int SQLSMALLINT