Development — ODBC
This section describes issues associated with ODBC development.
SQLPrepare() and SQLExecDirect() Calls Fail for Read-Only Connections (ODBC)
When connecting with read-only access, the SQLPrepare()
call fails due to a restriction in Exadata Express. The SQLExecDirect()
call also fails for the same reason.
Workaround
Use write access instead of read-only access. There are a number of ways to setup the write access in an ODBC application.
For example:
-
On Linux, set
ATTRIBUTES=W
in .odbc.ini
configuration file. -
On Windows, uncheck Read-Only Connection in utility
odbcad32
. -
In an application, you can do one of the following:
-
Pass in
DBA=w
instead ofDBA=R
as the parameter in SQLDriverConnect() function call. -
Pass in
SQL_ATTR_ACCESS_MODE
andSQL_MODE_READ_ONLY
parameters inSQLSetConnectAttr()
function call.
-