開発環境 Microsoft Visual C++ 2010 Express (SP1)
実行環境 Microsoft Windows XP Home Edition (SP3)
プロジェクトの種類 Win32 コンソール アプリケーション
プロジェクト名 odbctest
アプリケーションの種類 コンソール アプリケーション
追加のオプション 空のプロジェクト
文字セット Unicode


odbcdrv.c
#include <fcntl.h>	// _O_WTEXT
#include <io.h>		// _setmode
#include <stdio.h>	// _fileno
#include <Windows.h>
#include <odbcinst.h>
#include <tchar.h>
 
int main()
{
	_TCHAR buf[2048];
	LPTSTR p;
	BOOL b;
 
	// BOMなしUTF-16LE
	_setmode(_fileno(stdout), _O_WTEXT);
 
	b = SQLGetInstalledDrivers(buf, _countof(buf), NULL);
	for (p = buf; *p; p += _tcslen(p) + 1) {
		_tprintf(_T("{%s}\n"), p);
	}
	return 0;
}
 

出力
{SQL Server}
{Microsoft Access Driver (*.mdb)}
{Microsoft Text Driver (*.txt; *.csv)}
{Microsoft Excel Driver (*.xls)}
{Microsoft dBase Driver (*.dbf)}
{Microsoft Paradox Driver (*.db )}
{Microsoft Visual FoxPro Driver}
{Microsoft FoxPro VFP Driver (*.dbf)}
{Microsoft dBase VFP Driver (*.dbf)}
{Microsoft Access-Treiber (*.mdb)}
{Microsoft Text-Treiber (*.txt; *.csv)}
{Microsoft Excel-Treiber (*.xls)}
{Microsoft dBase-Treiber (*.dbf)}
{Microsoft Paradox-Treiber (*.db )}
{Microsoft Visual FoxPro-Treiber}
{Driver do Microsoft Access (*.mdb)}
{Driver da Microsoft para arquivos texto (*.txt; *.csv)}
{Driver do Microsoft Excel(*.xls)}
{Driver do Microsoft dBase (*.dbf)}
{Driver do Microsoft Paradox (*.db )}
{Driver para o Microsoft Visual FoxPro}
{Microsoft ODBC for Oracle}
最終更新:2012年09月01日 20:49