IBM / db2-samples

Db2 application code, configuration samples, and other examples
https://www.ibm.com/analytics/developing-with-db2
Apache License 2.0
85 stars 86 forks source link

where should I start #40

Open FriNagy opened 3 years ago

FriNagy commented 3 years ago

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?

kdrodger commented 3 years ago

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.

FriNagy commented 3 years ago

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