AccessDatabase.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace AppSecInc
4 {
5  namespace Databases
6  {
7  namespace Access
8  {
11  {
12  private:
14  std::wstring _connection_string;
15  std::wstring _dbq;
16  AccessDatabase& operator=(const AccessDatabase&);
17  public:
19  const std::wstring GetDBQ() const { return _dbq; }
21  void SetDBQ(const std::wstring& value) { _dbq = value; }
24  const AppSecInc::Databases::ODBC::ODBCConnection& GetConnection() const { return _connection; }
25  public:
29  void Create();
30  bool Exists();
31  void Connect();
32  void Disconnect();
33  void Drop();
36  MSXML2::IXMLDOMNodePtr Save(AppSecInc::Xml::XmlDocument& xmldoc, MSXML2::IXMLDOMNodePtr parent) const;
38  void Load(AppSecInc::Xml::XmlDocument& xmldoc, MSXML2::IXMLDOMNodePtr root);
39  };
40  }
41  }
42 }
const std::wstring GetDBQ() const
get the database (.mdf file) name
Definition: AccessDatabase.h:19
AppSecInc::Databases::ODBC::ODBCConnection & GetConnection()
returns the connection object
Definition: AccessDatabase.h:23
void Drop()
drop the database
Definition: AccessDatabase.cpp:38
void Disconnect()
disconnect from the database server
Definition: AccessDatabase.cpp:50
void Load(AppSecInc::Xml::XmlDocument &xmldoc, MSXML2::IXMLDOMNodePtr root)
deserialize database from xml
Definition: AccessDatabase.cpp:63
A generic connection info.
Definition: ConnectionInfo.h:10
~AccessDatabase()
Definition: AccessDatabase.cpp:21
An MSXML document.
Definition: XmlDocument.h:8
void Create()
create the database, fail if exists
Definition: AccessDatabase.cpp:25
A generic database.
Definition: Database.h:10
void Connect()
connect to the database server
Definition: AccessDatabase.cpp:44
void SetDBQ(const std::wstring &value)
set the database (.mdf file) name
Definition: AccessDatabase.h:21
const AppSecInc::Databases::ODBC::ODBCConnection & GetConnection() const
Definition: AccessDatabase.h:24
MSXML2::IXMLDOMNodePtr Save(AppSecInc::Xml::XmlDocument &xmldoc, MSXML2::IXMLDOMNodePtr parent) const
serialize database to xml
Definition: AccessDatabase.cpp:55
A Microsoft SQL Server database.
Definition: AccessDatabase.h:10
bool Exists()
returns true if database exists
Definition: AccessDatabase.cpp:32
An ODBC connection.
Definition: Connection.h:27
AccessDatabase()
constructors/destructors
Definition: AccessDatabase.cpp:7


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com