Connection.odbcGetInfoStr Method
Provides an interface to the SQLGetInfo ODBC function to retrieve information, in string format, about the ODBC driver and data source that are associated with a connection.
Syntax
public str odbcGetInfoStr(int InfoId)
Run On
Server
Parameters
- InfoId
Type: int
An Integer data type that specifies an ID for the requested information, according to the ODBC standard.
Return Value
Type: str
A String data type value for the information that is retrieved.
Examples
In the following example, the odbcGetInfoStr method returns the name of the database management system.
void getConnection()
{
Connection con;
str info;
#define.SQL_DBMS_NAME(17)
con = new Connection();
try
{
info = con.odbcGetInfoStr(#SQL_DBMS_NAME);
print info;
pause;
}
catch(exception::Error)
{
print "An error occurred.";
}
}