Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
db2cert7034-a4

db2cert7034-a4

Ratings: (0)|Views: 26 |Likes:
Published by jeeboomba
Chapter 4 :DB2 UDB V8.1 Family Application Development
Certification:
Chapter 4 :DB2 UDB V8.1 Family Application Development
Certification:

More info:

Published by: jeeboomba on Sep 23, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

 
DB2 UDB V8.1 Family Application DevelopmentCertification:CLI/ODBC programming
Get ready for the exam
Skill Level: IntroductoryRoger E. Sanders(rsanders@netapp.com) Database Performance EngineerNetwork Appliance, Inc.11 Sep 2003This tutorial introduces you to CLI/ODBC programming and walks you through thebasic steps used to construct a CLI/ODBC application. It also introduces you to theprocess to convert one or more high-level programming language source code filescontaining CLI/ODBC function calls into an executable application. This is the fourthin a series of seven tutorials that you can use to help prepare for the DB2 UDB V8.1Family Application Development certification exam (Exam 703).
Section 1. Before you start
What is this tutorial about?
This tutorial introduces you to CLI/ODBC programming and walks you through thebasic steps used to construct a CLI/ODBC application. It also introduces you to theprocess to convert one or more high-level programming language source code filescontaining CLI/ODBC function calls into an executable application. In this tutorial,you will learn:What environment, connection, statement, and descriptor handles are,and how they are used by CLI/ODBC applicationsThe steps involved in developing a CLI/ODBC applicationThe correct sequence to use when calling CLI/ODBC functions
 
How to establish a database connection from a CLI/ODBC applicationHow to configure a CLI/ODBC driverHow to evaluate CLI/ODBC function return codes and obtain diagnosticinformation when errors occurHow to convert source code files containing CLI/ODBC function calls intoan executable applicationThis is the fourth in a series of seven tutorials that you can use to help prepare forthe DB2 UDB V8.1 Family Application Development Certification exam (Exam 703).The material in this tutorial primarily covers the objectives in Section 4 of the exam,entitled "ODBC/CLI programming." You can view these objectives at:http://www.ibm.com/certify/tests/obj703.shtml.You do not need a copy of DB2 Universal Database to complete this tutorial.However, you can download a free trial version of IBM DB2 Universal Database fromthedeveloperWorks downloads sitefor reference.
Who should take this tutorial?
To take the DB2 UDB V8.1 Family Application Development exam, you must havealready passed the DB2 UDB V8.1 Family Fundamentals exam (Exam 700). Youcan use the DB2 Family Fundamentals tutorial series (seeResources) to preparefor that test. It is a very popular tutorial series that has helped many peopleunderstand the fundamentals of the DB2 family of products.Although not all materials discussed in the Family Fundamentals tutorial series arerequired to understand the concepts described in this tutorial, you should have abasic knowledge of:DB2 instancesDatabasesDatabase objectsDB2 securityThis tutorial is one of the tools that can help you prepare for Exam 703. You shouldalso take advantage of one or more of theResourcesidentified at the end of thistutorial for more information.
Conventions used in this tutorial
Several conventions are used to reinforce the material presented in this tutorial:
Monospaced
text is used to present SQL statements, DB2 commands,
developerWorks® ibm.com/developerWorksCLI/ODBC programmingPage 2 of 32© Copyright IBM Corporation 1994, 2007. All rights reserved.
 
and CLI functions, as well as the values of variables.
Emphasized 
or
italicized 
text is used to draw attention to new terms andconcepts.
Bold
text is used to identify SQL statement and DB2 command options.Throughout this tutorial, code segments that are irrelevant to thediscussion have been omitted and replaced with ellipses (
...
)
Notices and trademarks
Copyright, 2004 International Business Machines Corporation. All rights reserved.IBM, DB2, DB2 Universal Database, DB2 Information Integrator, WebSphere andWebSphere MQ are trademarks or registered trademarks of IBM Corporation in theUnited States, other countries, or both.Other company, product, and service names may be trademarks or service marks ofothers.
Section 2. Introduction to CLI/ODBC programming
What is CLI/ODBC?
One of the biggest drawbacks to developing applications with embedded SQL is thelack of interoperability that such an application affords: Embedded SQL applicationsdeveloped specifically for DB2 UDB will have to be modified (and in some casescompletely rewritten) before they can interact with other relational databasemanagement systems (RDBMSs). Because this limitation exists in every embeddedSQL application, regardless of the RDBMS for which it is written, in the early 1990sthe X/Open Company and the SQL Access Group (SAG), now a part of X/Open, jointly developed a standard specification for a callable SQL interface. This interfacewas known as the
X/Open Call-Level Interface,
or
X/Open CLI.
Much of the X/OpenCLI specification was later accepted as part of the ISO CLI international standard.The primary purpose of X/Open CLI was to increase the portability of databaseapplications by allowing them to become independent of any one databasemanagement system's programming interface.In 1992, Microsoft developed a callable SQL interface known as
Open Database Connectivity 
(or
ODBC 
) for the Microsoft Windows operating system. ODBC isbased on the X/Open CLI standards specification but it provides extendedfunctionality and capability that is not part of X/Open CLI. ODBC relies on anoperating environment in which data source-specific ODBC drivers are dynamicallyloaded at application run time (based on information provided when a connection is
ibm.com/developerWorks developerWorks® CLI/ODBC programming © Copyright IBM Corporation 1994, 2007. All rights reserved.Page 3 of 32

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->