Connection.odbcGetInfoInt Method [AX 2012]

Provides an interface to the SQLGetInfo Open Database Connectivity (ODBC) function to retrieve information about the ODBC driver and data source that are associated with a connection.

public int odbcGetInfoInt(int InfoId)

Run On

Server

Parameters

InfoId
Type: int
An integer that specifies an ID for the requested information according to the ODBC standard.

Return Value

Type: int
An integer value for the information that is retrieved.

In the following example, the odbcGetInfoInt method returns an integer value for the maximum length of the column name.

void getConnection() 
{ 
    Connection con; 
    Statement stmt; 
    int info; 
 
    #define.SQL_MAX_COLUMN_NAME_LEN(30) 
    con = new Connection(); 
 
    try 
    { 
        info = con.odbcGetInfoInt(#SQL_MAX_COLUMN_NAME_LEN); 
 
        print info; 
        pause; 
     } 
 
    catch(exception::Error) 
    { 
        print "An error occurred."; 
 
    } 
 
}

Community Additions

ADD
Show: