ODBQCmdEngine.h
Go to the documentation of this file.
1 #pragma once
2 
4 {
5 private:
7  AppSecInc::Xml::XmlDocument _xmlresults;
9  MSXML2::IXMLDOMNodePtr _xmlresults_rootnode;
11  std::wstring output;
12 public:
14  TCLAP::CmdLine _cmd;
16  TCLAP::SwitchArg _nologo;
18  TCLAP::SwitchArg _nosql;
20  TCLAP::SwitchArg _noresults;
22  TCLAP::ValueArg<std::wstring> _connectionstring;
24  TCLAP::ValueArg<std::wstring> _database;
26  TCLAP::MultiArg<std::wstring> _sql;
28  TCLAP::MultiArg<std::wstring> _file;
30  TCLAP::ValueArg<std::wstring> _type;
32  TCLAP::ValueArg<std::wstring> _delimiter;
34  TCLAP::ValueArg<std::wstring> _outputfile;
36  TCLAP::MultiArg<std::wstring> _datafile;
38  TCLAP::SwitchArg _flatten;
40  TCLAP::SwitchArg _rawoutput;
41 public:
42  ODBQCmdEngine(int argc, wchar_t * argv[]);
44  void Execute();
45 private:
47  std::wstring GetConnectionString();
49  void ExecuteSql(const std::wstring& query);
51  void ExecuteFile(const std::wstring& file);
55  void InsertDataFile(const std::wstring& file);
56 };
TCLAP::SwitchArg _nosql
suppress SQL statement output to console
Definition: ODBQCmdEngine.h:18
TCLAP::CmdLine _cmd
command line parameters
Definition: ODBQCmdEngine.h:14
TCLAP::MultiArg< std::wstring > _file
sql file(s) to execute
Definition: ODBQCmdEngine.h:28
TCLAP::SwitchArg _noresults
quiet execution, no results output
Definition: ODBQCmdEngine.h:20
TCLAP::ValueArg< std::wstring > _type
sql type, default - SqlServer
Definition: ODBQCmdEngine.h:30
TCLAP::ValueArg< std::wstring > _database
optional database name
Definition: ODBQCmdEngine.h:24
An MSXML document.
Definition: XmlDocument.h:8
Definition: ODBQCmdEngine.h:3
TCLAP::MultiArg< std::wstring > _sql
sql queries
Definition: ODBQCmdEngine.h:26
ODBQCmdEngine(int argc, wchar_t *argv[])
Definition: ODBQCmdEngine.cpp:4
Definition: OdbcParser.h:38
TCLAP::ValueArg< std::wstring > _connectionstring
connection string
Definition: ODBQCmdEngine.h:22
TCLAP::SwitchArg _flatten
flatten-only flag, don&#39;t execute sql
Definition: ODBQCmdEngine.h:38
TCLAP::SwitchArg _rawoutput
raw output flag
Definition: ODBQCmdEngine.h:40
void Execute()
execute per command line args
Definition: ODBQCmdEngine.cpp:39
TCLAP::ValueArg< std::wstring > _delimiter
optional delimiter
Definition: ODBQCmdEngine.h:32
TCLAP::SwitchArg _nologo
remove banner
Definition: ODBQCmdEngine.h:16
TCLAP::ValueArg< std::wstring > _outputfile
optional output filename
Definition: ODBQCmdEngine.h:34
TCLAP::MultiArg< std::wstring > _datafile
xml data files to insert
Definition: ODBQCmdEngine.h:36


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