Partilhar via


Connection.odbcGetInfoInt(Int32) Method

Definition

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:
 virtual int odbcGetInfoInt(int _InfoId);
public virtual int odbcGetInfoInt (int _InfoId);
abstract member odbcGetInfoInt : int -> int
override this.odbcGetInfoInt : int -> int
Public Overridable Function odbcGetInfoInt (_InfoId As Integer) As Integer

Parameters

_InfoId
Int32

An integer that specifies an ID for the requested information according to the ODBC standard.

Returns

An integer value for the information that is retrieved.

Remarks

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."; 
    } 
}

Applies to