; (UCHAR FAR*)pszTableOwner,SQL_NTS,
(UCHAR FAR*)pszTableName,SQL_NTS,
(UCHAR FAR*)pszColumnName,SQL_NTS));
if (!Check(nRetCode))
ThrowDBException(nRetCode,m_hstmt);
// 分配内存,填写信息
AllocAndCacheFieldInfo();
AllocRowset();
MoveNext();
m_bBOF = m_bEOF;
}
//异常信息的捕获
CATCH_ALL(e)
{
Close();
THROW_LAST();
}
END_CATCH_ALL
return TRUE;
}
//获取记录集信息
void CColumns::DoFieldExchange(CFieldExchange* pFX)
{
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Text(pFX,_T("TABLE_QUALIFIER"),m_strTableQualifier);
RFX_Text(pFX,_T("TABLE_OWNER"),m_strTableOwner);
RFX_Text(pFX,_T("TABLE_NAME"),m_strTableName);
RFX_Text(pFX,_T("COLUMN_NAME"),m_strColumnName);
RFX_Int(pFX,_T("DATA_TYPE"),m_nDataType);
RFX_Text(pFX,_T("TYPE_NAME"),m_strTypeName);
RFX_Long(pFX,_T("PRECISION"),m_nPrecision);
RFX_Long(pFX,_T("LENGTH"),m_nLength);
RFX_Int(pFX,_T("SCALE"),m_nScale);
RFX_Int(pFX,_T("RADIX"),m_nRadix);
RFX_Int(pFX,_T("NULLABLE"),m_fNullable);
RFX_Text(pFX,_T("REMARKS"),m_strRemarks);
}
CColumns::CColumns(CDatabase* pDatabase): CRecordset(pDatabase)
{
m_strTableQualifier = _T("");
m_strTableOwner = _T("");
m_strTableName = _T("");
m_strColumnName = _T("");
m_nDataType = 0;
m_strTypeName = _T("");
m_nPrecision = 0;
m_nLength &nbs