first commit for openGauss connect odbc code

This commit is contained in:
lishifu
2020-06-24 16:11:37 +08:00
parent 2a3a17f54e
commit 59eb2808c4
458 changed files with 141117 additions and 75 deletions

31
odbc-test-gauss/common.h Normal file
View File

@ -0,0 +1,31 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef WIN32
#include <windows.h>
#endif
#include <sql.h>
#include <sqlext.h>
#ifdef WIN32
#define snprintf _snprintf
#endif
extern SQLHENV env;
extern SQLHDBC conn;
#define CHECK_STMT_RESULT(rc, msg, hstmt) \
if (!SQL_SUCCEEDED(rc)) \
{ \
print_diag(msg, SQL_HANDLE_STMT, hstmt); \
exit(1); \
}
extern void print_diag(char *msg, SQLSMALLINT htype, SQLHANDLE handle);
extern void test_connect_ext(char *extraparams);
extern void test_connect(void);
extern void test_disconnect(void);
extern void print_result_meta(HSTMT hstmt);
extern void print_result(HSTMT hstmt);