2008/03/11

Turbo C++ 동적 MDB (Access Database) 생성하기

// For Create MDB
#include <odbcinst.h>
#pragma link "Odbccp32.lib"



strMainDBPath = "CREATE_DB=\"" + strMainDBPath + "\" General\0";

bool bCreated;
bCreated = SQLConfigDataSource(
NULL,
ODBC_ADD_DSN,
"Microsoft Access Driver (*.mdb)",
strMainDBPath.c_str() );

if (bCreated == true)
{
ShowMessage("Created!!");
}
else
{
ShowMessage("Fail to create database");
}

Original Post : http://neodreamer-dev.tistory.com/83

No comments :

Post a Comment