Samchon Framework for CPP  1.0.0
main.cpp
1 #include <iostream>
2 
3 #include <samchon/library/TSQLi.hpp>
4 #include <samchon/library/SQLStatement.hpp>
5 
6 #include <samchon/library/XML.hpp>
7 
8 using namespace std;
9 using namespace samchon::library;
10 
11 #ifdef _WIN64
12 # ifdef _DEBUG
13 # pragma comment(lib, "x64/Debug/SamchonFramework.lib")
14 # else
15 # pragma comment(lib, "x64/Release/SamchonFramework.lib")
16 # endif
17 #else
18 # ifdef _DEBUG
19 # pragma comment(lib, "Debug/SamchonFramework.lib")
20 # else
21 # pragma comment(lib, "Release/SamchonFramework.lib")
22 # endif
23 #endif
24 
25 void main()
26 {
27  shared_ptr<SQLi> sqli(new TSQLi());
28 
29  try
30  {
31  sqli->connect("127.0.0.1", "BOMTV", "sa", "1231");
32 
33  auto stmt = sqli->createStatement();
34  stmt->executeDirectly("EXEC getOrderArray");
35 
36  cout << stmt->toXML()->toString() << endl;
37  }
38  catch (exception &e)
39  {
40  cout << e.what() << endl;
41  }
42 
43  system("pause");
44 }
Definition: RWMutex.hpp:4
Package of libraries.
Definition: library.hpp:84
A SQL interface for T-SQL.
Definition: TSQLi.hpp:19