#include #include #pragma Comment (lib, "odbccp32.lib") cdatabase m_dbnavdb; if (! SQLConfigDataSource (Null, ODBC_ADD_DSN, "SQL Server", // Drive Name "DSN = NAVDB / 0Server = (local) / 0DATABASE = NAVDB ")) // Test
{AFXMessageBox ("Configure Source Database DSN Failed !!!"); Return False;}
IF (! ("DSN = NAVDB; UID = SA; PWD = SA"), 0)) {AFXMESSAGEBOX ("Open Database Failed!");}