There are some small example programs for demonstrating how to use the SQLDBC SDK and building applications.
Some are written in C++ like HelloWorld.cpp. Other once are written in native C like HelloWorld_C.c.
The example programs HelloWorld.cpp and HelloWorld_C.c shows the following:
Other example programs for UNICODE etc. are exists. You will find all files neccessary to build the examples here.
Unpack this archive to any folder you want or use the demo sources, if you have an full installation, in your examples directory under <indep_prog>/samples/SQLDBC .
All of the examples can build at the same way. We like to describe the way for building the HelloWorld example.
MS Windows (32 and 64 Bit)
cd "C:\\Program Files\\sdb\\programs\\samples\\SQLDBC\\HelloWorld"
nmake SQLDBCSDK="C:\Program Files\sdb\programs" win32
UNIX
cd /opt/sdb/programs/samples/SQLDBC/HelloWorld
<os> := linux | linuxIa64 | linuxppc | sun | hpux | hpIa64 | dec | aix | win32 | amd64
For LINUX call:
make SQLDBCSDK="/opt/sdb/programs" linux
HelloWorld MONA RED HOTELDB
Sucessfull connected to HOTELDB as user MONA
Hello world