6 |
#include ".\PostgresLayer.h" |
#include ".\PostgresLayer.h" |
7 |
|
|
8 |
|
|
9 |
PostgresLayer::PostgresLayer(void) |
PostgresLayer::PostgresLayer(ConfigFile &config) |
10 |
{ |
{ |
11 |
//db.OpenEx("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=172.16.11.25; user=gruppe2;password=1337",CDatabase::noOdbcDialog); |
CString dsn; |
12 |
db.OpenEx("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=192.168.10.1; uid=torben;password=nielsen;database=h6projekt"); |
dsn.Format("ODBC;Description=asd;DRIVER=PostgreSQL ANSI;SERVER=%s; uid=%s;password=%s;database=%s",config.host, config.username, config.password, config.database); |
13 |
|
db.OpenEx(dsn, CDatabase::noOdbcDialog); |
14 |
} |
} |
15 |
|
|
16 |
PostgresLayer::~PostgresLayer(void) |
PostgresLayer::~PostgresLayer(void) |