db2-samples icon indicating copy to clipboard operation
db2-samples copied to clipboard

where should I start

Open FriNagy opened this issue 3 years ago • 2 comments

Hallo, I will write one simple C or C++ prog with MS Visual Studio 2019,

connect to db2 execute a sql statement write the result to console

where should I start?

FriNagy avatar Sep 30 '21 22:09 FriNagy

I'd suggest starting with the C/C++ application development documentation in our Knowledge Center. https://www.ibm.com/support/producthub/db2/docs/content/SSEPGG_11.5.0/com.ibm.db2.luw.apdv.embed.doc/doc/c0005909.html

The C++ README in the samples should also be useful. https://github.com/IBM/db2-samples/blob/master/cpp/README

A relatively simple example with just connects and disconnects from a DB is https://github.com/IBM/db2-samples/blob/master/cpp/dbconn.sqC .

As a next level example, https://github.com/IBM/db2-samples/blob/master/cpp/tbsel.sqC executes some simple table operations.

Hope that helps.

kdrodger avatar Oct 01 '21 03:10 kdrodger

Thanks for your answer,

I try it but without success

my steps: download the examples

start Develeloper Command Prompt for VS 2019 change to: "...repos\db2-samples\cpp" start: nmake dbconn nmake will start: bldapp dbconn sample but bldapp don't exit

I will start with simple projekt file (.sln) where can we find one easy demo project for VS 2019

Regards

FriNagy avatar Oct 01 '21 23:10 FriNagy