summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorshirleyquirk <31934565+shirleyquirk@users.noreply.github.com>2020-09-29 16:08:24 +0100
committerGitHub <noreply@github.com>2020-09-29 17:08:24 +0200
commitf8866598e7e0226aac7a6720adf4440278f9508d (patch)
treead3581c608fe9ae5b6191c141bb8fe873a695acf /lib
parent22d0a3993268c334e62461f39ef02b1d02c64ca1 (diff)
downloadNim-f8866598e7e0226aac7a6720adf4440278f9508d.tar.gz
odbc regression from #14357 (#15417)
#14357 changed from sending 'val', an int, to a pointer to int, which is understandable, but not how SQLSetEnvAttr works.
"Depending on the value of Attribute, ValuePtr will be a 32-bit integer value or point to a null-terminated character string"
Diffstat (limited to 'lib')
-rw-r--r--lib/impure/db_odbc.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/impure/db_odbc.nim b/lib/impure/db_odbc.nim
index 8aadfae73..3568cf1cc 100644
--- a/lib/impure/db_odbc.nim
+++ b/lib/impure/db_odbc.nim
@@ -508,7 +508,7 @@ proc open*(connection, user, password, database: string): DbConn {.
   if res != SQL_SUCCESS: dbError("Error: unable to initialise ODBC environment.")
   res = SQLSetEnvAttr(result.env,
                       SQL_ATTR_ODBC_VERSION.TSqlInteger,
-                      cast[SqlPointer](val.addr), resLen.TSqlInteger)
+                      cast[SqlPointer](val), resLen.TSqlInteger)
   if res != SQL_SUCCESS: dbError("Error: unable to set ODBC driver version.")
   # allocate hDb handle
   res = SQLAllocHandle(SQL_HANDLE_DBC, result.env, result.hDb)