16.10.2015 Views

Getting Started with WebSphere Application Server

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix B – Up and running <strong>with</strong> DB2 233<br />

B.8 Basic sample programs<br />

Depending on the programming language used, different syntax is required to connect to a<br />

DB2 database and perform operations. Below are links to basic sample programs which<br />

connect to a database, and retrieve one record. We suggest you first download (from<br />

ftp://ftp.software.ibm.com/software/data/db2/udb/db2express/samples.zip) all the sample<br />

programs in this section:<br />

CLI program<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0401chong/index.html#scenario1<br />

ODBC program<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0401chong/index.html#scenario2<br />

C program <strong>with</strong> embedded SQL<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0401chong/index.html#scenario3<br />

JDBC program using Type 2 Universal (JCC) driver<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0401chong/index.html#scenario6<br />

JDBC program using Type 4 Universal (JCC) driver<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0401chong/index.html#scenario8<br />

Visual Basic and C++ ADO program - Using the IBM OLE DB provider for DB2<br />

(IBMDADB2)<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0402chong2/index.html#scenario1<br />

Visual Basic and C++ ADO program - Using the Microsoft OLE DB Provider for ODBC<br />

(MSDASQL)<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0402chong2/index.html#scenario2<br />

Visual Basic and C# ADO.Net using the IBM DB2 .NET Data Provider<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0402chong2/index.html#scenario3<br />

Visual Basic and C# ADO.Net using the Microsoft OLE DB .NET Data Provider<br />

http://www.ibm.com/developerworks/db2/library/techarticle/dm-<br />

0402chong2/index.html#scenario4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!