Quantcast
Channel: Silk Performer
Viewing all articles
Browse latest Browse all 4084

Wiki Page: Why do I get the error:OdbcConnect(ODBC: 5 - ODBC error, 08002 (0) : [Microsoft][ODBC Driver Manager] Connection in use) when running my database script?

$
0
0
This error is caused if the connection to the database is already in use because you are trying to use connection details that have already been established. For example, if the OdbcConnect details specified below, are set again later in the script you would receive this error. dcltrans transaction TInit begin OdbcAlloc(SQL_HANDLE_ENV, hEnv); OdbcAlloc(SQL_HANDLE_DBC, hDBC, hEnv); OdbcSetConnectAttr(hDBC, SQL_ATTR_AUTOCOMMIT, SQL_AUTOCOMMIT_OFF); OdbcConnect(hDBC, "DSN=DataBase;UID=User1;PWD=User1;");[/ end TInit; transaction TMain begin ............ OdbcConnect(hDBC, "DSN=DataBase;UID=User1;PWD=User1;"); To rectify the above errors please ensure that you establish only one connection using the same handle to the database. This connection will then have associated cursor set to this database connection. Old KB# 18561

Viewing all articles
Browse latest Browse all 4084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>