8.1.7.3.0 SQL_ATTR_METADATA_ID

Oracle added support for SQL_ATTR_METADATA_ID
in release 8.1.7.2.0. However, by default it was set to SQL_FALSE, which forced case sensitive. In 8.1.7.3.0, they added a workaround in the ODBC Administrator configuration "Set Metadata ID Default to SQL_TRUE" check box. If this box is checked, SQL_ATTR_METADATA_ID is SQL_TRUE(case insensitive).
What I am seeing is that with this option set, SQLColumns no longer works. Using Microsoft ODBC Test application (GATOR) to eliminate our application, I recieve the following going against the Oracle Sample data using the Oracle driver 8.1.7.3.0
++++++++++++++
Full Connect:
Full Connect(Default)
Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3
Successfully connected to DSN 'SDAOracle73'.
SQLColumns:
In:
StatementHandle = 0x00D218D8,
CatalogName = SQL_NULL_HANDLE,
NameLength1 = 0,SchemaName = "scott", NameLength2 = 5, TableName = "csthdr",
NameLength3 = 6, ColumnName = "%", NameLength4 = 1
Return: SQL_SUCCESS=0
Get Data All:
"TABLE_CAT", "TABLE_SCHEM", "TABLE_NAME", "COLUMN_NAME", "DATA_TYPE", "TYPE_NAME", "COLUMN_SIZE", "BUFFER_LENGTH", "DECIMAL_DIGITS", "NUM_PREC_RADIX", "NULLABLE", "REMARKS", "COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH", "ORDINAL_POSITION", "IS_NULLABLE"
0 rows fetched from 18 columns.
+++++++++++++++++++++++++++++++++
Please note that the results are the same regardless if everything is UPPERCASE.
History; 8.1.7.0.0 (lower & upper worked)
8.1.7.2.0 (only UPPER worked)
8.1.7.3.0 (none work)
Does anyone know if Oracle is aware of this and plans to address in the next version?
Thanks,
Scott

When I do this on my machine (8.1.7 connecting to itself via the 8.1.7.3 ODBC driver with the Metadata attribute forced to TRUE), I'm seeing the expected results:
SQLColumns:
In:
StatementHandle = 0x007518F8,
CatalogName = SQL_NULL_HANDLE,
NameLength1 = 0, SchemaName = "scott", NameLength2 = 5, TableName = "emp", NameLength3 = 3, ColumnName = SQL_NULL_HANDLE, NameLength4 = 0
Return: SQL_SUCCESS=0
Get Data All:
"TABLE_CAT", "TABLE_SCHEM", "TABLE_NAME", "COLUMN_NAME", "DATA_TYPE", "TYPE_NAME", "COLUMN_SIZE", "BUFFER_LENGTH", "DECIMAL_DIGITS", "NUM_PREC_RADIX", "NULLABLE", "REMARKS", "COLUMN_DEF", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH", "ORDINAL_POSITION", "IS_NULLABLE"
"", "SCOTT", "EMP", "EMPNO", 3, "DECIMAL", 4, 6, 0, 10, 0, "", "", 3, , , 1, "NO"
"", "SCOTT", "EMP", "ENAME", 12, "VARCHAR2", 10, 10, <Null>, <Null>, 1, "", "", 12, , , 2, "YES"
"", "SCOTT", "EMP", "JOB", 12, "VARCHAR2", 9, 9, <Null>, <Null>, 1, "", "", 12, , , 3, "YES"
"", "SCOTT", "EMP", "MGR", 3, "DECIMAL", 4, 6, 0, 10, 1, "", "", 3, , , 4, "YES"
"", "SCOTT", "EMP", "HIREDATE", 93, "DATE", 19, 16, <Null>, <Null>, 1, "", "", 9, 3, , 5, "YES"
"", "SCOTT", "EMP", "SAL", 3, "DECIMAL", 7, 9, 2, 10, 1, "", "", 3, , , 6, "YES"
"", "SCOTT", "EMP", "COMM", 3, "DECIMAL", 7, 9, 2, 10, 1, "", "", 3, , , 7, "YES"
"", "SCOTT", "EMP", "DEPTNO", 3, "DECIMAL", 2, 4, 0, 10, 1, "", "", 3, , , 8, "YES"
8 rows fetched from 18 columns.
I get the same thing regardless of whether "scott" and "emp" are upper or lower case.
Assuming you're getting no columns for the schema "scott" and table "emp", can you provide more information about your setup?
Justin

Similar Messages

  • Can't change ODBC configuration

    Hello Guys, hope you can help me on this. The platform is:
    Server Oracle 10g R2 10.2.0.3 on Windows 2003 Server R2 english
    Client Oracle ODBC 10g R2 10.2.0.3 on Windows XP SP3 english
    Oracle Server NLS Configuration:
    NLS_LANGUAGE     SPANISH
    NLS_TERRITORY     SPAIN
    NLS_CURRENCY     €
    NLS_ISO_CURRENCY     SPAIN
    NLS_NUMERIC_CHARACTERS     ,.
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD/MM/RR
    NLS_DATE_LANGUAGE     SPANISH
    NLS_CHARACTERSET     WE8MSWIN1252
    NLS_SORT     SPANISH
    NLS_TIME_FORMAT     HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT     DD/MM/RR HH24:MI:SSXFF
    NLS_TIME_TZ_FORMAT     HH24:MI:SSXFF TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD/MM/RR HH24:MI:SSXFF TZR
    NLS_DUAL_CURRENCY     €
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSE
    Oracle Server Regional and Language Options:
    Standars and formats: English (United States)
    Decimal symbol: .
    No. of digists after decimal: 2
    Digit grouping symbol: ,
    Location: United States
    Client machine Regional and Language Options:
    Standars and formats: Spanish (Chile)
    Decimal symbol: ,
    No. of digists after decimal: 2
    Digit grouping symbol: .
    Location: Chile
    THE PROBLEM
    The user open a specific application that uses ODBC to connect to the database.
    If the ODBC (System DSN), is configured to "Use Oracle NLS Settings" in numeric settings, then the application deploy the numbers without decimals
    But if we change the ODBC settings to "Use US Settings" the application deploy the numbers with two decimals
    The usern doesnt have the privileges to change that setting, what can I do to solve this issue?
    Best regards.

    It depends on your connect code, but you may be able specify NUM= in the connection string.
    This is from the Oracle ODBC docs..
    hope it helps
    Greg
    Format of the Connection String
    The following table describes keywords that can be included in the connection string argument of the SQLDriverConnect function call. Missing keywords will be read from the 32-bit Administrator entry for the data source. Values specified in the connection string will override those contained in the 32-bit Administrator entry. See the Microsoft ODBC 3.51 Software Development Kit and Programmer's Reference for more information about the SQLDriverConnect function.
    Keyword
    Meaning
    Values (bolded values in this column indicate the default setting)
    DSN
    ODBC Data Source Name
    User-supplied name.
    DBQ
    TNS Service Name
    User-supplied name.
    UID
    User ID or User Name
    User-supplied name.
    PWD
    Password
    User-supplied password. Specify PWD=; for an empty password.
    DBA
    Database Attribute
    W=write access.
    R=read-only access.
    APA
    Applications Attributes
    T=Thread Safety Enabled.
    F=Thread Safety Disabled.
    RST
    Result Sets
    T=Result Sets Enabled.
    F=Result Sets Disabled.
    QTO
    Query Timeout Option
    T=Query Timeout Enabled.
    F=Query Timeout Disabled.
    CSR
    Close Cursor
    T=Close Cursor Enabled.
    F=Close Cursor Disabled.
    BNF
    Bind NUMBER as FLOAT
    T=Bind NUMBER as FLOAT.
    F=Bind NUMBER as NUMBER.
    DRH
    Disable Rule Hint
    T=Disable Rule Hint.
    F=Enable Rule Hint.
    BAM
    Batch Autocommit Mode
    IfAllSuccessful=Commit only if all statements are successful (old behavior).
    UpToFirstFailure=Commit up to first failing statement (V7 ODBC behavior).
    AllSuccessful=Commit all successful statements (only when connected to an Oracle database; against other databases, same behavior as V7).
    FBS
    Fetch Buffer Size
    User-supplied numeric value (specify a value in bytes of 0 or greater).
    The default is 60,000 bytes.
    FEN
    Failover
    T=Failover Enabled.
    F=Failover Disabled.
    FRC
    Failover Retry Count
    User-supplied numeric value.
    The default is 10.
    FDL
    Failover Delay
    User-supplied numeric value.
    The default is 10.
    LOB
    LOB Writes
    T=LOBs Enabled.
    F=LOBs Disabled.
    MTS
    Microsoft Transaction Server Support
    T=Disabled.
    F=Enabled.
    FWC
    Force SQL_WCHAR Support
    T=Force SQL_WCHAR Enabled.
    F=Force SQL_WCHAR Disabled.
    EXC
    EXEC Syntax
    T=EXEC Syntax Enabled.
    F=EXEC Syntax Disabled.
    XSM
    Schema Field
    Default=Default.
    Database=Database Name.
    Owner=Owner Name.
    MDI
    Set Metadata ID Default
    T=SQL_ATTR_METADATA_ID defaults to SQL_TRUE.
    F=SQL_ATTR_METADATA_ID defaults to SQL_FALSE.
    DPM
    Disable SQLDescribeParam
    T=SQLDescribeParam Disabled.
    F=SQLDescribeParam Enabled.
    BTD
    Bind TIMESTAMP as DATE
    T=Bind SQL_TIMESTAMP as Oracle DATE
    F=Bind SQL_TIMESTAMP as Oracle TIMESTAMP
    NUM
    Numeric Settings
    NLS=Use Oracle NLS numeric settings (to determine the decimal and group separator).
    MS=Use Microsoft regional settings.
    US=Use US settings.
    If the following keyword is specified in the connection string, the Oracle ODBC Driver will not read any values defined from the 32-bit Administrator:
    DRIVER={Oracle ODBC Driver}
    Examples of valid connection strings are:
    1) DSN=Personnel;UID=Kotzwinkle;PWD=;
    2) DRIVER={Oracle ODBC Driver};UID=Kotzwinkle;PWD=whatever;DBQ=instl_alias;DBA=W;

  • Importing chart data

    I'm trying to import a 500x5 data set into Pages from Appleworks. Pages won't convert the document directly, or import the data (unless I'm missing a hidden feature). Copy and paste has pretty much locked up Pages for the last 10 minutes. Anyone know how to do this? At the moment I'm using gnuplot for this, at least it has no problems with big data sets, even if it does need a PhD to use.

    I'm getting a similar response when using the database wizard to connect to a SQL database. TO see if this is a related error I ran a trace on the procedure Kattanc outlined above, and found the same error occurring in the trace:
    VISIO           14fc-2794 ENTER SQLSetStmtAttrW
      SQLHSTMT            0x000000028E9F2150
      SQLINTEGER               10014 <SQL_ATTR_METADATA_ID>
      SQLPOINTER          2165658496 <unknown>
      SQLINTEGER                   2
    VISIO           14fc-2794 EXIT  SQLSetStmtAttrW  with return code -1 (SQL_ERROR)
      SQLHSTMT            0x000000028E9F2150
      SQLINTEGER               10014 <SQL_ATTR_METADATA_ID>
      SQLPOINTER          2165658496 <unknown>
      SQLINTEGER                   2
      DIAG [S1009] [Microsoft][ODBC Driver Manager] Invalid argument value (0)
    Followed, when I select a table, by:
    VISIO           14fc-2794 ENTER SQLFetch
      HSTMT               0x000000028E989D70
    VISIO           14fc-2794 EXIT  SQLFetch  with return code 100 (SQL_NO_DATA_FOUND)
      HSTMT               0x000000028E989D70

Maybe you are looking for

  • Business Workplace - "Tips & Tricks"

    I've just noticed a very, very cool feature in Business Workplace. When you go to your Inbox, and you hover over "Tips & Tricks," something appears, a bit like a Windows tooltip, except far more useful and far less annoying. Does anyone know how I ca

  • 24" iMac Video Problem on Window XP

    I brought 2 units of 24" iMac last month and using boot camp to install windows xp. Both iMac are completed the installation of window xp and one of the iMac run normally but video problem found on second iMac. After running in window xp about 5 – 10

  • Query results varying with unused table in from clause

    Hi all, I have table (processing_table2) specified in the FROM clause of SQL query but I havent used any of its value in the SQL statement but it still affects the results of the query. Please help me here as i am clueless. Below is the query provide

  • Oracle SQL Developer v 1.5.3 does not export

    I attempted to export query results using Oracle SQL Developer. I right-clicked on the result and attepted to export data - it failed without explanation - nothing happened. I'm a new user with this product - is this a known bug and if so - could you

  • Copying from iPhoto on MacBook to iMac

    I have used my MacBook Air to organise photos whilst away into events and entered descriptions.  Now I am back I want to move these events as they are to my Apple Mac.  How can I do this and keep them in their original events?