aboutsummaryrefslogtreecommitdiff
path: root/odb/mssql/connection.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-17 12:39:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-17 12:39:22 +0200
commitdca9904e6f47acf3a9629f59012ab84b9348aea8 (patch)
tree18895f3303ba8ee9cfb1c9d5205956a66456bd99 /odb/mssql/connection.cxx
parent212c4ac5e23867bf8e1c7d29b70c7a65b43be2eb (diff)
Use ANSI versions of ODBC functions, get rid of warnings
We have to use ANSI versions explicitly because VC++ build defaults to Unicode.
Diffstat (limited to 'odb/mssql/connection.cxx')
-rw-r--r--odb/mssql/connection.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/odb/mssql/connection.cxx b/odb/mssql/connection.cxx
index 03b8deb..2f882c3 100644
--- a/odb/mssql/connection.cxx
+++ b/odb/mssql/connection.cxx
@@ -43,10 +43,10 @@ namespace odb
// Set the manual commit mode.
//
- r = SQLSetConnectAttr (handle_,
- SQL_ATTR_AUTOCOMMIT,
- (SQLPOINTER) SQL_AUTOCOMMIT_OFF,
- 0);
+ r = SQLSetConnectAttrA (handle_,
+ SQL_ATTR_AUTOCOMMIT,
+ (SQLPOINTER) SQL_AUTOCOMMIT_OFF,
+ 0);
if (!SQL_SUCCEEDED (r))
// Still use the handle version of translate_error since there
@@ -56,10 +56,10 @@ namespace odb
// Enable Multiple Active Result Sets (MARS).
//
- r = SQLSetConnectAttr (handle_,
- SQL_COPT_SS_MARS_ENABLED,
- (SQLPOINTER) SQL_MARS_ENABLED_YES,
- SQL_IS_UINTEGER);
+ r = SQLSetConnectAttrA (handle_,
+ SQL_COPT_SS_MARS_ENABLED,
+ (SQLPOINTER) SQL_MARS_ENABLED_YES,
+ SQL_IS_UINTEGER);
if (!SQL_SUCCEEDED (r))
translate_error (r, handle_, SQL_HANDLE_DBC);
@@ -68,14 +68,14 @@ namespace odb
//
{
SQLSMALLINT out_conn_str_size;
- r = SQLDriverConnect (handle_,
- 0, // Parent windows handle.
- (SQLCHAR*) db_.connect_string ().c_str (),
- SQL_NTS,
- 0, // Output connection string buffer.
- 0, // Size of output connection string buffer.
- &out_conn_str_size,
- SQL_DRIVER_NOPROMPT);
+ r = SQLDriverConnectA (handle_,
+ 0, // Parent window handle.
+ (SQLCHAR*) db_.connect_string ().c_str (),
+ SQL_NTS,
+ 0, // Output connection string buffer.
+ 0, // Size of output connection string buffer.
+ &out_conn_str_size,
+ SQL_DRIVER_NOPROMPT);
if (!SQL_SUCCEEDED (r))
translate_error (r, handle_, SQL_HANDLE_DBC);
@@ -167,7 +167,7 @@ namespace odb
// Execute.
//
- r = SQLExecDirect (direct_stmt_, (SQLCHAR*) s, (SQLINTEGER) n);
+ r = SQLExecDirectA (direct_stmt_, (SQLCHAR*) s, (SQLINTEGER) n);
// SQL_NO_DATA indicates that a DML statement hasn't affected
// any rows.