Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8291427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:07:32+00:00 2026-06-08T13:07:32+00:00

I am trying to create a table dynamically with odbc and I need to

  • 0

I am trying to create a table dynamically with odbc and I need to get the correct type string to use in the create table statement. However it seems there is no way to get any TYPE_NAME string from the Oracle driver (oracle-instantclient11.2-odbc-11.2.0.1.0-1.x86_64).
Calling SQLGetTypeInfo(hStmt, sqlType) with the following types always returns an empty recordest:

SQL_NUMERIC, SQL_INTEGER, SQL_BIGINT

I was expecting respectively NUMERIC, NUMERIC(10,0) and NUMERIC(19,0). Or NUMBER replacing numeric as listed in http://docs.oracle.com/cd/B28359_01/server.111/b28318/datatype.htm#i16209 : NUMBER(p,s)

Instead, a list of SQL_ALL_TYPES reveals no support at all for NUMBER but instead there is an undocumented (as for the aforementioned link) DECIMAL type.

Any idea of why this behaviour and how to get the correct string without having to examine the driver connection DBMS name?

PS:
SQL_ALL_TYPES returns:
BLOB, LONG RAW, BFILE, RAW, CLOB, LONG, CHAR, DECIMAL, BINARY_FLOAT,
BINARY_DOUBLE, DOUBLE PRECISION, DATE, VARCHAR2, NCHAR, NVARCHAR2, NCLOB

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:07:33+00:00Added an answer on June 8, 2026 at 1:07 pm

    Oracle stores the numeric data types as follows

    NUMERIC : SQL_DECIMAL=3 size 38,0
    NUMERIC(10,0) : SQL_DECIMAL=3 size 10, 0
    NUMERIC(19,0) : SQL_DECIMAL=3 size 19, 0

    The last digit is the scale so for exmaple :-

    NUMERIC(12,3) : SQL_DECIMAL=3 size 12, 3

    Commercial drivers such as Easysoft do support the require data types in ODBC :-

    Full Connect(Default)
    
    Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3
    
    Successfully connected to DSN 'ESOracle32'.
    SQLGetTypeInfo:
                    In:             StatementHandle = 0x00DD7C58, DataType = SQL_INTEGER=4
                    Return: SQL_SUCCESS=0
    
    Get Data All:
    "TYPE_NAME", "DATA_TYPE", "COLUMN_SIZE", "LITERAL_PREFIX", "LITERAL_SUFFIX", "CREATE_PARAMS", "NULLABLE", "CASE_SENSITIVE", "SEARCHABLE", "UNSIGNED_ATTRIBUTE", "FIXED_PREC_SCALE", "AUTO_UNIQUE_VALUE", "LOCAL_TYPE_NAME", "MINIMUM_SCALE", "MAXIMUM_SCALE", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "NUM_PREC_RADIX", "INTERVAL_PRECISION"
    "INTEGER", 4, 9, <Null>, <Null>, <Null>, 1, 0, 3, 0, 0, 0, "NUMBER(9)", <Null>, <Null>, 6, <Null>, 10, <Null>
    1 row fetched from 19 columns.
    
    SQLGetTypeInfo:
                    In:             StatementHandle = 0x00DD7C58, DataType = SQL_NUMERIC=2
                    Return: SQL_SUCCESS=0
    
    Get Data All:
    "TYPE_NAME", "DATA_TYPE", "COLUMN_SIZE", "LITERAL_PREFIX", "LITERAL_SUFFIX", "CREATE_PARAMS", "NULLABLE", "CASE_SENSITIVE", "SEARCHABLE", "UNSIGNED_ATTRIBUTE", "FIXED_PREC_SCALE", "AUTO_UNIQUE_VALUE", "LOCAL_TYPE_NAME", "MINIMUM_SCALE", "MAXIMUM_SCALE", "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "NUM_PREC_RADIX", "INTERVAL_PRECISION"
    "NUMBER", 2, 38, <Null>, <Null>, "precision,scale", 1, 0, 3, 0, 0, 0, "NUMBER", <Null>, <Null>, 2, <Null>, 10, <Null>
    1 row fetched from 19 columns.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use for loops to create a table which dynamically returns
I was trying to create a table dynamically and put textboxes in it. Here
I am trying to create a table with values that are in a String
I'm currently trying dynamically create an html table in PHP. Further, I want the
I am trying to create a Single Table Inheritance. However, the Controller must be
I'm trying to create a buttons dynamically and add them to table layout panel
I'm trying to create some means of dynamically selecting the table for a procedure
I am trying to create a table dynamically in my code behind. My problem
I am trying to create a CSV file from a dynamically generated table.I have
I'm currently trying to dynamically create a table using JS and HTML. But at

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.