27 if (strcmp(C(name), expected_name) != 0) \
29 sprintf(buf, "line %d: wrong name in column %d expected '%s' got '%s'", \
30 main_line, index, expected_name, C(name)); \
31 ODBC_REPORT_ERROR(buf); \
48 CheckFetch(
const char *c1name,
const char *c1,
const char *c2)
57 fprintf(stderr,
"%s:%d: Column 1 error '%s' (%d) expected '%s' (%d)\n", __FILE__,
main_line,
col1, (
int)
ind1, c1,
63 fprintf(stderr,
"%s:%d: Column 2 error '%s' (%d) expected '%s' (%d)\n", __FILE__,
main_line,
col2, (
int)
ind2, c2,
72 #define CheckFetch main_line = __LINE__; CheckFetch
75 main(
int argc,
char *argv[])
85 odbc_command(
"create table #tmp1 (c varchar(20), i int)");
102 odbc_command(
"select * from #tmp1 order by c, i compute sum(i)");
125 odbc_command(
"select c as mao, i from #tmp1 order by c, i compute sum(i) by c compute max(i)");
167 odbc_command(
"select * from #tmp1 where i = 2 or i = 34 order by c, i compute min(i) by c");
int main(int argc, char *argv[])
static void TestName(SQLSMALLINT index, const char *expected_name)
#define CHKMoreResults(res)
#define odbc_command(cmd)
#define CHKColAttribute(a, b, c, d, e, f, res)
#define CHKDescribeCol(a, b, c, d, e, f, g, h, res)
#define ODBC_VECTOR_SIZE(x)
int strcmp(const char *str1, const char *str2)
unsigned int odbc_db_version_int(void)
int odbc_disconnect(void)
int odbc_db_is_microsoft(void)
static SQLRETURN odbc_connect(TDS_DBC *dbc, TDSLOGIN *login)
SQLRETURN SQLBindCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLINTEGER BufferLength, SQLINTEGER *StrLen_or_Ind)
signed short int SQLSMALLINT