/[H6]/MicrosoftDBLayer.cpp
ViewVC logotype

Diff of /MicrosoftDBLayer.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 ".\MicrosoftDBLayer.h"  #include ".\MicrosoftDBLayer.h"
7    
8    
9  MicrosoftDBLayer::MicrosoftDBLayer(void)  MicrosoftDBLayer::MicrosoftDBLayer(ConfigFile &config)
10  {  {
11          db.OpenEx("ODBC; Description=; DRIVER=SQL Server; SERVER=TK-Teacher; UID=GroupTwo; PWD=toog30", CDatabase::noOdbcDialog);          CString dsn;
12          db.ExecuteSQL("USE GroupTwo");          dsn.Format("ODBC; Description=; DRIVER=SQL Server; SERVER=%s; UID=%s; PWD=%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  MicrosoftDBLayer::~MicrosoftDBLayer(void)  MicrosoftDBLayer::~MicrosoftDBLayer(void)

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

  ViewVC Help
Powered by ViewVC 1.1.20