Modified:
branches/guffert/test/my_unicode.c
Log:
Use SQLExecDirectW() for creating table with non-ASCII in column name
Modified: branches/guffert/test/my_unicode.c
===================================================================
--- branches/guffert/test/my_unicode.c 2007-08-22 20:19:13 UTC (rev 676)
+++ branches/guffert/test/my_unicode.c 2007-08-23 15:01:43 UTC (rev 677)
@@ -451,15 +451,17 @@
SQLWCHAR wbuff[40];
SQLSMALLINT len;
- ok_sql(hstmt, "DROP TABLE IF EXISTS t_colattrib");
- ok_sql(hstmt, "CREATE TABLE t_colattrib (a\xe3g INT)");
-
ok_env(henv, SQLAllocConnect(henv, &hdbc1));
ok_con(hdbc1, SQLConnectW(hdbc1, W(L"myodbc3"), SQL_NTS, W(L"root"), SQL_NTS,
W(L""), SQL_NTS));
ok_con(hdbc1, SQLAllocStmt(hdbc1, &hstmt1));
+ ok_sql(hstmt1, "DROP TABLE IF EXISTS t_colattrib");
+ ok_stmt(hstmt1, SQLExecDirectW(hstmt1,
+ W(L"CREATE TABLE t_colattrib (a\u00e3g INT)"),
+ SQL_NTS));
+
ok_sql(hstmt1, "SELECT * FROM t_colattrib AS b");
ok_stmt(hstmt1, SQLColAttributeW(hstmt1, 1, SQL_DESC_NAME,
@@ -479,11 +481,12 @@
is_num(len, 7);
is_wstr(sqlwchar_to_wchar_t(wbuff), L"integer", 8);
+ ok_sql(hstmt1, "DROP TABLE IF EXISTS t_colattrib");
+
ok_stmt(hstmt1, SQLFreeStmt(hstmt1, SQL_DROP));
ok_con(hdbc1, SQLDisconnect(hdbc1));
ok_con(hdbc1, SQLFreeConnect(hdbc1));
- ok_sql(hstmt, "DROP TABLE IF EXISTS t_colattrib");
return OK;
}
| Thread |
|---|
| • Connector/ODBC 3.51 commit: r677 - branches/guffert/test | jwinstead | 23 Aug |