home *** CD-ROM | disk | FTP | other *** search
- .Ds U
- .Pt ""
- .Ff "" "4.0 DB-Library Changes" "4.0 DB-Library Changes"
- Release 4.0 of DB-Library contains a wealth of new features.
- There are over 50 new routines, as well as a number of minor changes
- to existing routines.
- In addition, Release 4.0 comes with a thoroughly revised and greatly
- improved \f2\*L Reference Manual\f1.
- As part of this revision, the system-specific material formerly
- contained in Section 3 of the \f2\*L Reference Manual\f1 now resides in
- a separate companion document, the \f2\*L Reference Supplement\f1.
- .LP
- Change bars along the right margin are used to indicate new and changed
- technical features in this release of \*L.
- The change bars do not, however, indicate all the changes made to the
- documentation, which was in large part rewritten for this release.
- .H1 "New DB-Library Routines"
- The new routines cover a number of different categories, as described below.
- .H2 "Browse Mode"
- Browse mode provides a means for browsing through database rows and updating
- their values a row at a time.
- Since a row being browsed is not the actual row residing in the database,
- but is instead a copy residing in program variables, the program
- must be able to ensure that changes to the variables' values can be reliably
- used to update the original database row.
- In particular, in multi-user situations, the program needs to ensure that
- updates made to the database by one user do not unwittingly overwrite
- updates recently made by another user.
- Browse mode regulates this type of multi-user updating with a timestamp column
- in browsable tables.
- .LP
- A number of routines support this capability:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbqual()\f1 Return a pointer to a WHERE clause, for use in updating a table.
- .ti -16n
- \f2dbfreequal()\f1 Free the memory allocated by \f2dbqual()\f1.
- .ti -16n
- \f2dbtsnewval()\f1 Return the timestamp value.
- .ti -16n
- \f2dbtsnewlen()\f1 Return the length of the timestamp value.
- .ti -16n
- \f2dbtsput()\f1 Put the timestamp value into the current row in the DBPROCESS.
- .ti -16n
- \f2dbcolbrowse()\f1 Determine whether a column can be updated via browse mode.
- .ti -16n
- \f2dbcolsource()\f1 Return the name of the database column from which
- the specified result column was derived.
- .ti -16n
- \f2dbtabbrowse()\f1 Determine whether a table can be updated via browse mode.
- .ti -16n
- \f2dbtabcount()\f1 Return the number of tables involved in the current query.
- .ti -16n
- \f2dbtabname()\f1 Return the name of a table based upon its column.
- .ti -16n
- \f2dbtabsource()\f1 Return the name of the table from which a particular result column was derived.
- .ps +2
- .vs +2
- .ad
- .H2 "Text and Image Handling"
- .sp 0.5v
- \*S supports two new datatypes: text and image.
- Since text and image values can be quite large, several routines are available to facilitate
- the process of updating text and image columns in database tables:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbwritetext()\f1 Send a text or image value to the \*S.
- .ti -16n
- \f2dbmoretext()\f1 Send part of a text or image value to the \*S.
- .ti -16n
- \f2dbtxptr()\f1 Return the value of the text pointer for a particular column.
- .ti -16n
- \f2dbtxtimestamp()\f1 Return the value of the text timestamp for a particular column.
- .ti -16n
- \f2dbtxtsnewval()\f1 Return the new value of a text timestamp after a call to \f2dbwritetext()\f1.
- .ti -16n
- \f2dbtxtsput()\f1 Put the new value of a text timestamp into the specified column.
- .ps +2
- .vs +2
- .ad
- .H2 "Associating User Data with a DBPROCESS"
- It is now possible to associate some arbitrary user-allocated data
- with a particular DBPROCESS structure.
- One use for this capability is to transfer information from a \*S message
- handler to the program code that triggered it.
- The following routines support this capability:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbsetuserdata()\f1 Use a DBPROCESS structure to save a pointer to user-allocated data.
- .ti -16n
- \f2dbgetuserdata()\f1 Return a pointer to user-allocated data from the DBPROCESS structure.
- .in -16n
- .ps +2
- .vs +2
- .ad
- .H2 "Return Parameter Values from Stored Procedures"
- In Release 4.0, stored procedures can return values to the application
- through parameters.
- The following routines support this capability:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbnumrets()\f1 Determine the number of return parameter values generated by a stored procedure.
- .ti -16n
- \f2dbretdata()\f1 Return a pointer to a return parameter value.
- .ti -16n
- \f2dbretname()\f1 Return the parameter name associated with a return parameter value.
- .ti -16n
- \f2dbretlen()\f1 Return the length of a return parameter value.
- .ti -16n
- \f2dbrettype()\f1 Return the datatype of a return parameter value.
- .in -16n
- .ps +2
- .vs +2
- .ad
- .H2 "Return Status from Stored Procedures"
- Stored procedures now return status values to the application.
- The following routines support this capability:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbretstatus()\f1 Determine the status number returned by a stored procedure.
- .ti -16n
- \f2dbhasretstat()\f1 Determine whether the current command generated a status number.
- .ps +2
- .vs +2
- .ad
- .H2 "Remote Procedure Calls"
- Remote procedure calls provide an alternative way to call
- a stored procedure.
- They have certain advantages over the TRANSACT-SQL EXECUTE
- command.
- These routines support remote procedure calls:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbrpcinit()\f1 Initialize a remote procedure call.
- .ti -16n
- \f2dbrpcparam()\f1 Add a parameter to a remote procedure call.
- .ti -16n
- \f2dbrpcsend()\f1 Signal the end of a remote procedure call.
- .ps +2
- .vs +2
- .ad
- .H2 "Remote Passwords"
- In Release 4.0, a command batch or stored procedure running on one
- \*S can call a stored procedure on another \*S.
- To do this, the first \*S must log into the second.
- The application initiating this server-to-server communication
- can specify the password that the first \*S will use when it logs into
- the remote \*S.
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbrpwset()\f1 Add a remote password to the LOGINREC structure.
- .ti -16n
- \f2dbrpwclr()\f1 Clear all remote passwords from the LOGINREC structure.
- .ps +2
- .vs +2
- .ad
- .H2 "Initialization"
- There are two new routines dealing with \*L initialization:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbinit()\f1 Initialize \*L.
- .ti -16n
- \f2dbloginfree()\f1 Free a login record.
- .ps +2
- .vs +2
- .ad
- .H2 "Result Column Information"
- There's one new routine in this category:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbvarylen()\f1 Determine whether a result column's data can vary in length.
- .ps +2
- .vs +2
- .ad
- .H2 "VMS Asynchronous Capability"
- Several routines now have asynchronous VMS versions.
- These allow the application to perform
- other actions while awaiting a \*S response.
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbcancel_a()\f1 The asynchronous version of \f2dbcancel()\f1.
- .ti -16n
- \f2dbnextrow_a()\f1 The asynchronous version of \f2dbnextrow()\f1.
- .ti -16n
- \f2dbopen_a()\f1 The asynchronous version of \f2dbopen()\f1.
- .ti -16n
- \f2dbresults_a()\f1 The asynchronous version of \f2dbresults()\f1.
- .ti -16n
- \f2dbsqlexec_a()\f1 The asynchronous version of \f2dbsqlexec()\f1.
- .ps +2
- .vs +2
- .ad
- .H2 "Allocating a Network Connection Structure"
- For OS/2 and MS-DOS,
- DB-Library contains a routine that allows the application to provide the network connection information
- normally obtained through the \f2interfaces\f1 file.
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbsetconnect()\f1 Allocate and initialize a network connection structure.
- .ps +2
- .vs +2
- .ad
- .H2 "Bulk Copy"
- A new set of bulk copy routines replaces the previous set.
- Among the major improvements, the new routines
- use the DB-Library error handling facilities
- and allow reuse of a DBPROCESS structure.
- In most instances, the new routines correspond closely in function to the old.
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2bcp_batch()\f1 Save any preceding rows in the \*S.
- .ti -16n
- \f2bcp_bind()\f1 Bind data from a program variable to a \*S table.
- .ti -16n
- \f2bcp_colfmt()\f1 Specify the format of a host file for bulk copy purposes.
- .ti -16n
- \f2bcp_collen()\f1 Set the program variable data length for the current copy IN.
- .ti -16n
- \f2bcp_colptr()\f1 Set the program variable data address for the current copy IN.
- .ti -16n
- \f2bcp_columns()\f1 Set the total number of columns found in the host file.
- .ti -16n
- \f2bcp_control()\f1 Change various control parameter default settings.
- .ti -16n
- \f2bcp_done()\f1 End a bulk copy from program variables into the \*S.
- .ti -16n
- \f2bcp_exec()\f1 Execute a bulk copy of data between a database table and a host file.
- .ti -16n
- \f2bcp_init()\f1 Initialize bulk copy.
- .ti -16n
- \f2bcp_moretext()\f1 Send part of a text or image value to the \*S.
- .ti -16n
- \f2bcp_sendrow()\f1 Send a row of data from program variables to the \*S.
- .ti -16n
- \f2BCP_SETL()\f1 Set the LOGINREC for bulk copy operations.
- .ps +2
- .vs +2
- .ad
- .H1 "Changes to Existing Routines and Manual Pages"
- The following manual pages have significant changes:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2dbbind()\f1 Accommodation for image and text data.
- .ti -16n
- \f2dbconvert()\f1 Accommodation for image and text data.
- .ti -16n
- \f2dbcount()\f1 Additional return value.
- .ti -16n
- \f2dberrhandle()\f1 User-supplied handler has additional parameters.
- .ti -16n
- \f2dbmsghandle()\f1 User-supplied handler has additional parameters.
- .ti -16n
- \f2dbsetbusy()\f1 User-supplied handler gets passed a DBPROCESS parameter.
- .ti -16n
- \f2dbsetidle()\f1 User-supplied handler gets passed a DBPROCESS parameter.
- .ti -16n
- \f2dbsetinterrupt()\f1 User-supplied handler gets passed a DBPROCESS parameter.
- .ti -16n
- \f2errors\f1 Additional DB-Library error messages.
- .ti -16n
- \f2options\f1 Additional DB-Library options.
- .ti -16n
- \f2types\f1 Text and image datatypes.
- .ps +2
- .vs +2
- .ad
- .H1 "Routines No Longer Documented"
- The following routines are no longer documented, for the reasons given:
- .sp
- .na
- .ps -2
- .vs -2
- .in +16n
- .ta +16n
- .ti -16n
- \f2datetochar()\f1 Superseded by \f2dbconvert()\f1.
- .ti -16n
- \f2mnytochar()\f1 Superseded by \f2dbconvert()\f1.
- .ti -16n
- \f2dbaltname()\f1 Supported a feature that is not implemented in the \*S.
- .ti -16n
- \f2dberrstr()\f1 Superseded by \f2dberrhandle()\f1.
- .ti -16n
- \f2dbperror()\f1 Superseded by \f2dberrhandle()\f1.
- .ti -16n
- \f2dboserrstr()\f1 Superseded by \f2dberrhandle()\f1.
- .ti -16n
- \f2dberrno()\f1 Superseded by \f2dberrhandle()\f1.
- .ti -16n
- \f2dbgetmsg()\f1 Superseded by \f2dbmsghandle()\f1.
- .ti -16n
- \f2dbservermsg()\f1 Superseded by \f2dbmsghandle()\f1.
- .ti -16n
- \f2dbnummsg()\f1 Superseded by \f2dbmsghandle()\f1.
- .ti -16n
- \f2dbsetmsg()\f1 Superseded by \f2dbmsghandle()\f1.
- .in -16n
- .ps +2
- .vs +2
- .ad
- .sp
- In addition, the old bulk copy routines have been replaced by new ones, as described above.
- .H1 "The New DB-Library Reference Manual"
- The \f2DB-Library Reference Manual\f1 has been revised extensively for Release 4.0.
- Besides the changes outlined above,
- other major changes include the following:
- .Bl
- A new Introduction, which serves as an overview to the development of \*S applications.
- It includes a short introductory example that uses the most common DB-Library routines.
- A detailed description accompanies this example.
- The Introduction also contains useful descriptions of the various categories of DB-Library routines.
- .Bl
- The Section 2 manual pages have undergone considerable revision.
- They contain a large number of new comments, many of which deal with issues of usage.
- Many of the descriptions of parameters and return values have been expanded.
- In addition, much of the text has been rewritten for clarity.
- .Bl
- Section 3, formerly Section 4, contains an expanded introduction to the two-phase commit special library.
- .Bl
- Appendix A is new.
- It contains the alphabetical list of routines that used to be in the Introduction.
- .Bl
- The index is greatly expanded, with new entries based on key concepts.
- .Bz
- .H1 "The DB-Library Reference Supplement"
- The new \f2\*L Reference Supplement\f1 serves as a companion document
- to the \f2\*L Reference Manual\f1.
- It comprises the system-specific material (example programs and
- information on compiling and linking an application) formerly
- contained in Section 3.
- There are separate versions of the \f2Supplement\f1 for each operating
- system that \*L runs on.
- You should place the version for your operating system
- behind the \f2\*L Reference Manual\f1 in the binder.
- .LP
- The UNIX version of the \f2Supplement\f1 includes an environment-specific section,
- Appendix A, to accommodate different versions of UNIX.
- Because the contents of this appendix vary according to the UNIX environment you're using,
- it is packaged separately, with the \f2Release Bulletin\f1.
- .LP
- In comparison with the material previously contained in Section 3, the \f2Supplement\f1
- includes additional examples that illustrate most of the new routines.
- It also includes a complete example of a two-phase commit application.
- The VMS version of the \f2Supplement\f1 incorporates the material on shareable \*L,
- which first appeared in the \f2SYBASE 3.2 VAX/VMS Supplement\f1.
-