19 static const char table_name[] =
"mytab\xe7\x8e\x8b\xe9\xb4\xbb";
25 "abc\xc3\xa9\xc3\xa1\xc3\xb4",
"abc\xc3\xa9\xc3\xae\xc3\xb4",
27 "abc\xe7\x8e\x8b\xe9\xb4\xbb",
"abc\xe7\x8e\x8b\xe9\xb4\xbb\xe5\x82\x91\xe7\x8e\x8b\xe9\xb4\xbb\xe5\x82\x91",
34 "0x610061006100",
"0x610061006100",
36 "0x610062006300e900e100f400",
"0x610062006300e900ee00f400",
38 "0x6100620063008b733b9d",
"0x6100620063008b733b9d91508b733b9d9150",
42 static char tmp[3200];
61 for (
n = 1, p =
strings; p[0] && p[1]; p += 2, ++
n) {
74 s1_len = strlen(p[0]);
75 s2_len = strlen(p[1]);
76 printf(
"insert #%d\n", (
int)
n);
82 sprintf(
tmp,
"IF NOT EXISTS(SELECT * FROM %s WHERE k = %d AND c = %s AND vc = %s) SELECT 1",
table_name, (
int)
n, p[0], p[1]);
90 main(
int argc,
char *argv[])
105 printf(
"Driver is not FreeTDS, exiting\n");
112 printf(
"Test for MSSQL only\n");
122 sprintf(
tmp,
"CREATE TABLE %s (k int, c NCHAR(10), vc NVARCHAR(10))",
table_name);
126 for (
n = 1, p =
strings; p[0] && p[1]; p += 2, ++
n) {
127 sprintf(
tmp,
"INSERT INTO %s VALUES (%d,N'%s',N'%s')",
table_name, (
int)
n, p[0], p[1]);
133 sprintf(
tmp,
"IF NOT EXISTS(SELECT * FROM %s WHERE k = %d AND c = %s AND vc = %s) SELECT 1",
table_name, (
int)
n, p[0], p[1]);
156 printf(
"Not possible for this platform.\n");
#define CHKBindParameter(a, b, c, d, e, f, g, h, i, res)
#define CHKPrepare(a, b, res)
#define odbc_reset_statement()
#define CHKAllocStmt(a, res)
#define odbc_command(cmd)
#define CHKAllocConnect(a, res)
#define CHKAllocEnv(a, res)
#define CHKDriverConnect(a, b, c, d, e, f, g, res)
unsigned int odbc_db_version_int(void)
void odbc_test_skipped(void)
int odbc_disconnect(void)
int odbc_read_login_info(void)
int odbc_db_is_microsoft(void)
void odbc_check_no_row(const char *query)
int odbc_driver_is_freetds(void)
static const char *const strings[]
int main(int argc, char *argv[])
static const char table_name[]
static void init_connect(void)
static void TestBinding(int minimum)
static const char *const strings_hex[]
unsigned int
A callback function used to compare two keys in a database.
Int minimum(Int i, Int j)
SQLRETURN SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength)
#define SQL_ATTR_ODBC_VERSION
#define SQL_DRIVER_NOPROMPT
signed short int SQLSMALLINT