This sample shows how to load data from a RDB source, using RDB DAS, into a SDO graph, then retrieve data from it, modify the graph and update the data source based on the modified graph.
Follow the https://svn.apache.org/repos/asf/incubator/tuscany/cpp/das/GettingStarted.html document to download, compile and install Tuscany DAS for C++.
Download the latest version of Postgres Core and ODBC Driver. You can find it here: http://www.postgresql.org/download/.
Install both, Postgres Core and ODBC Driver, on your OS.
Compile the sample source using Visual Studio Express solution under <tuscany_das_cpp>/samples/CompanySample/VSExpress/.
To run the sample execute the file <tuscany_das_cpp>/samples/CompanySample/VSExpress/debug/CompanySample.exe
Requirements:
Postgres server must be running accepting connection from localhost.
The sample access a data source using DSN, it by default access a DSN named "DAStestcases" using "postgres" user with "tuscany" password. However this settings can be modified on main function defined on <tuscany_das_cpp>/samples/CompanySample/src/main.cpp:
...
std::string
dsn = "DASCompanySample";
std::string
user = "postgres";
std::string
password = "tuscany";
...
The sample files are located under <tuscany_das_cpp>/samples/CompanySample/.
Contents:
/src/main.cpp: This file contains the sample source code.