diff options
author | Hanfei Shen <[email protected]> | 2011-05-04 00:21:57 +0800 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2011-06-22 09:36:45 +0200 |
commit | 64633846cc6959eca307d37e7b879ac14182f3c3 (patch) | |
tree | 40e5eee967631e9bcd382c7fbb92daec344ec84b /lib/odbc/test | |
parent | b9d8ae5aa52774ed0ce12c9d21ad7f3670c2dca1 (diff) | |
download | otp-64633846cc6959eca307d37e7b879ac14182f3c3.tar.gz otp-64633846cc6959eca307d37e7b879ac14182f3c3.tar.bz2 otp-64633846cc6959eca307d37e7b879ac14182f3c3.zip |
Add support for SQL_WLONGVARCHAR
Diffstat (limited to 'lib/odbc/test')
-rw-r--r-- | lib/odbc/test/odbc_data_type_SUITE.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/odbc/test/odbc_data_type_SUITE.erl b/lib/odbc/test/odbc_data_type_SUITE.erl index 84c99e183b..63aa32496c 100644 --- a/lib/odbc/test/odbc_data_type_SUITE.erl +++ b/lib/odbc/test/odbc_data_type_SUITE.erl @@ -1461,7 +1461,9 @@ unicode(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - w_char_support_win(Ref, Table, Latin1Data); + w_char_support_win(Ref, Table, Latin1Data, sql_wvarchar), + {updated, _} = odbc:sql_query(Ref, "DROP TABLE " ++ Table), + w_char_support_win(Ref, Table, Latin1Data, sql_wlongvarchar); postgres -> direct_utf8(Ref, Table, Latin1Data); mysql -> @@ -1470,7 +1472,7 @@ unicode(Config) when is_list(Config) -> {skip, "not currently supported"} end. -w_char_support_win(Ref, Table, Latin1Data) -> +w_char_support_win(Ref, Table, Latin1Data, CharType) -> UnicodeIn = lists:map(fun(S) -> unicode:characters_to_binary(S,latin1,{utf16,little}) end, @@ -1479,7 +1481,7 @@ w_char_support_win(Ref, Table, Latin1Data) -> test_server:format("UnicodeIn (utf 16): ~p ~n",[UnicodeIn]), {updated, _} = odbc:param_query(Ref, "INSERT INTO " ++ Table ++ "(FIELD) values(?)", - [{{sql_wvarchar,50},UnicodeIn}]), + [{{CharType,50},UnicodeIn}]), {selected,_,UnicodeOut} = odbc:sql_query(Ref,"SELECT * FROM " ++ Table), |