/[H6]/MySQLLayer.cpp
ViewVC logotype

Diff of /MySQLLayer.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 41 by torben, Tue Sep 5 12:50:38 2006 UTC revision 47 by torben, Wed Sep 6 20:27:24 2006 UTC
# Line 6  Line 6 
6  #include ".\MySQLLayer.h"  #include ".\MySQLLayer.h"
7    
8    
9  MySQLLayer::MySQLLayer(void)  MySQLLayer::MySQLLayer(ConfigFile &config)
10  {  {
11          db.OpenEx("ODBC;Description=asd;DRIVER=MySQL ODBC 3.51 Driver;SERVER=172.16.11.25; user=gruppe2;password=1337",CDatabase::noOdbcDialog);          CString dsn;
12          db.ExecuteSQL("USE Gruppe2");          dsn.Format("ODBC;Description=asd;DRIVER=MySQL ODBC 3.51 Driver;SERVER=%s;user=%s;password=%s", config.host, config.username, config.password);
13            db.OpenEx(dsn, CDatabase::noOdbcDialog);
14    
15            CString sql;
16            sql.Format("USE %s", config.database);
17            db.ExecuteSQL( sql );
18  }  }
19    
20  MySQLLayer::~MySQLLayer(void)  MySQLLayer::~MySQLLayer(void)

Legend:
Removed from v.41  
changed lines
  Added in v.47

  ViewVC Help
Powered by ViewVC 1.1.20