Share via


Connection.odbcGetInfoLong(Int32) Method

Definition

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

public:
 virtual int odbcGetInfoLong(int _InfoId);
public virtual int odbcGetInfoLong (int _InfoId);
abstract member odbcGetInfoLong : int -> int
override this.odbcGetInfoLong : int -> int
Public Overridable Function odbcGetInfoLong (_InfoId As Integer) As Integer

Parameters

_InfoId
Int32

An Integer data type that specifies an ID for the requested information, according to the ODBC standard.

Returns

An Integer data type value for the information that is retrieved.

Remarks

This method retrieves a 32-bit integer and returns it as an integer.

In the following example, the odbcGetInfoLong method returns an integer for the maximum row size.

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

Applies to