在一个数据库中,我如何获得这个数据库所有数据表的名称?? 我如何获得该数据表名?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Q182831HOWTO: Using the ADO OpenSchema Method from Visual C++http://support.microsoft.com/default.aspx?scid=kb;en-us;182831///This is a sample in MSDN///here , m_tablesList is a listbox/// goog luck!_bstr_t tablesNames;CString kooky;m_tablesList.ResetContent();UpdateData( TRUE); try { m_recordSet = m_connection->OpenSchema (adSchemaTables,vtMissing,vtMissing); while ( !m_recordSet->EOF ) { tablesNames = m_recordSet->Fields->Item[L"TABLE_NAME"]->Value; kooky = (char*) tablesNames; if (kooky.Left(4) != "MSys") m_tablesList.AddString( kooky );//添加表名到控件显示 m_recordSet->MoveNext(); } } catch(...) {} UpdateData( FALSE ); m_recordSet = NULL; 如何生成用于编译 代理/占位dll的mk文件 [求助]游戏反外挂(作弊) 关于CTime类的问题 怎样得到一个窗口的m_hWnd BMP或JPG上写字,解决有Gmail邀请送(100份) CString类中可以存储汉字么???我使用它时为何会乱码?如果能使用它接收汉字,该如何用? 可否更新SDK? 我要买书! CreateInstance 问题 VC++中如何将字符串转换成URL encode的? 在线求解:如何获取系统时间中的微秒数!! 急!!! 在线求解:关于QueryPerformanceCounter()的一个问题!!!
HOWTO: Using the ADO OpenSchema Method from Visual C++
http://support.microsoft.com/default.aspx?scid=kb;en-us;182831
///This is a sample in MSDN
///here , m_tablesList is a listbox
/// goog luck!
_bstr_t tablesNames;
CString kooky;
m_tablesList.ResetContent();
UpdateData( TRUE);
try
{
m_recordSet = m_connection->OpenSchema (adSchemaTables,vtMissing,vtMissing);
while ( !m_recordSet->EOF )
{
tablesNames = m_recordSet->Fields->Item[L"TABLE_NAME"]->Value;
kooky = (char*) tablesNames;
if (kooky.Left(4) != "MSys")
m_tablesList.AddString( kooky );//添加表名到控件显示
m_recordSet->MoveNext();
}
}
catch(...) {}
UpdateData( FALSE );
m_recordSet = NULL;