--- PostgresLayer.cpp 2006/09/06 18:40:35 43 +++ PostgresLayer.cpp 2006/09/06 20:27:24 47 @@ -6,10 +6,11 @@ #include ".\PostgresLayer.h" -PostgresLayer::PostgresLayer(void) +PostgresLayer::PostgresLayer(ConfigFile &config) { - //db.OpenEx("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=172.16.11.25; user=gruppe2;password=1337",CDatabase::noOdbcDialog); - db.OpenEx("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=192.168.10.1; uid=torben;password=nielsen;database=h6projekt"); + CString dsn; + dsn.Format("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=%s; uid=%s;password=%s;database=%s",config.host, config.username, config.password, config.database); + db.OpenEx(dsn, CDatabase::noOdbcDialog); } PostgresLayer::~PostgresLayer(void)