Abstract

This chapter provides an overview of embedded SQL. Although a knowledgeable SQL user can accomplish a great deal with an interactive command processor, much interaction with a database is through application programs that provide a predictable interface for non-technologically sophisticated users. The chapter focuses on the preparation of programs that contain SQL statements and the special things that should be done to fit SQL within a host programming language. SQL statements can be embedded in a wide variety of languages (host languages). The way of handling source code depends on the type of host language being used. Programs in which SQL is embedded need to be able to intercept the error codes returned by the DBMS and to handle them before the errors reach the end user. When the WHERE predicate in a SELECT statement contains a primary key expression, the result table will contain at most one row. SELECT statements that may return more than one row present a bit of a problem when they are embedded in a program: host language variables can hold only one value at a time and the SQL command processor cannot work with host language arrays. Although many of today's database development environments make it easy to create forms for data entry and modification, situations still arise where data modification has to be included in an underlying application program.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.