Oracle Forms Developer And Oracle Reports Developer

Transcription

Oracle Forms Developer andOracle Reports DeveloperCommon Built-in PackagesRelease 6iJanuary, 2000Part No. A73152-01

Oracle Forms Developer and Oracle Reports Developer: Common Built-inPackages, Release 6iThe part number for this volume is A73152-01Copyright 1999, 2000, Oracle Corporation. All rights reserved.Portions copyright Blue Sky Software Corporation. All rights reserved.Contributors: Fred Bethke, Joan Carter, Kenneth Chu, Kate Dumont, TomHaunert, Colleen McCann, Leanne Soylemez, Poh Lee Tan, Tony WolframThe programs are not intended for use in any nuclear, aviation, masstransit, medical, or other inherently dangerous applications. It shall belicensee's responsibility to take all appropriate fail-safe, back up,redundancy and other measures to ensure the safe use of suchapplications if the Programs are used for such purposes, and Oracledisclaims liability for any damages caused by such use of the Programs.This Program contains proprietary information of Oracle Corporation; it isprovided under a license agreement containing restrictions on use anddisclosure and is also protected by copyright, patent and other intellectualproperty law. Reverse engineering of the software is prohibited.The information contained in this document is subject to change withoutnotice. If you find any problems in the documentation, please report themto us in writing. Oracle Corporation does not warrant that this document iserror free. No part of this document may be reproduced or transmitted inany form or by any means, electronic or mechanical, for any purpose,without the express written permission of Oracle CorporationIf this Program is delivered to a U.S. Government Agency of theDepartment of Defense, then it is delivered with Restricted Rights and thefollowing legend is applicable:Restricted Rights Legend Programs delivered subject to the DOD FARSupplement are "commercial computer software" and use, duplication anddisclosure of the Programs shall be subject to the licensing restrictions setforth in the applicable Oracle license agreement. Otherwise, Programsdelivered subject to the Federal Acquisition Regulations are "restrictedcomputer software" and use, duplication and disclosure of the Programsshall be subject to the restrictions in FAR 52.227-14, Rights in Data -General, including Alternate III (June 1987). Oracle Corporation, 500Oracle Parkway, Redwood City, CA 94065.Oracle is a registered trademark, and Express, Oracle Browser, OracleForms, Oracle Graphics, Oracle Installer, Oracle Reports, Oracle7, Oracle8,Oracle Web Application Server, Personal Oracle, Personal Oracle Lite, andPL/SQL are trademarks or registered trademarks of Oracle Corporation.All other company or product names mentioned are used for identificationpurposes only and may be trademarks of their respective owners.

Table of ContentsBUILT-IN PACKAGES . . . 1ABOUT BUILT-IN PACKAGES .1ABOUT THE DDE PACKAGE .3MICROSOFT WINDOWS PREDEFINED DATA FORMATS .4DDE PREDEFINED EXCEPTIONS .6ABOUT THE DEBUG PACKAGE .8ABOUT THE LIST PACKAGE.8ABOUT THE OLE2 PACKAGE .8ABOUT THE ORA FFI PACKAGE .8ABOUT THE ORA NLS PACKAGE .9ORA NLS CHARACTER CONSTANTS . 9ORA NLS NUMERIC CONSTANTS . 11ABOUT THE ORA PROF PACKAGE . 12ABOUT THE TEXT IO PACKAGE . 12ABOUT THE TOOL ENV PACKAGE . 13ABOUT THE TOOL ERR PACKAGE . 13ABOUT THE TOOL RES PACKAGE. 14BUILDING RESOURCE FILES .14ABOUT THE EXEC SQL PACKAGE . 16CONNECTION AND CURSOR HANDLES . 17RETRIEVING RESULT SETS FROM QUERIES OR NON-ORACLESTORED PROCEDURES .17EXEC SQL PREDEFINED EXCEPTIONS . 17USING THE EXEC SQL PACKAGE . 19EXECUTING ARBITRARY SQL AGAINST ANY CONNECTION . 19COPYING DATA BETWEEN TWO DATABASES.21EXECUTING A NON-ORACLE DATABASE STOREDPROCEDURE AND FETCHING ITS RESULT SET .24ALPHABETIC LIST OF PACKAGED SUBPROGRAMS.25DDE PACKAGE . . . 29DDE PACKAGE. 29DDE.APP BEGIN . 29DDE.APP END . 30DDE.APP FOCUS . 31DDE.EXECUTE . 32DDE.GETFORMATNUM .32DDE.GETFORMATSTR.33DDE.INITIATE . 34DDE.ISSUPPORTED . 35i

DDE.DMLERR N OT SUPPORTED . 35DDE.P OKE . 35DDE.R EQUEST . 36DDE.T ERMINATE . 37DEBUG PACKAGE . . . 39DEBUG PACKAGE . 39DEBUG .BREAK . 39DEBUG .GETX . 39DEBUG .INTERPRET . 41DEBUG .SETX . 42DEBUG .SUSPEND . 42EXEC SQL PACKAGE. . 45EXEC SQL PACKAGE . 45EXEC SQL.O PEN CONNECTION . 46EXEC SQL.C URR CONNECTION . 46EXEC SQL.D EFAULT CONNECTION . 47EXEC SQL.O PEN CURSOR. 48EXEC SQL.P ARSE. 49EXEC SQL.D ESCRIBE COLUMN . 51EXEC SQL.B IND VARIABLE . 54EXEC SQL.D EFINE COLUMN . 56EXEC SQL.E XECUTE . 57EXEC SQL.E XECUTE AND FETCH . 59EXEC SQL.F ETCH ROWS . 60EXEC SQL.M ORE RESULT SETS . 62EXEC SQL.C OLUMN VALUE . 63EXEC SQL.V ARIABLE VALUE . 65EXEC SQL.I S OPEN . 66EXEC SQL.C LOSE CURSOR . 68EXEC SQL.I S CONNECTED . 69EXEC SQL.I S OCA CONNECTION. 69EXEC SQL.C LOSE CONNECTION . 70EXEC SQL.L AST ERROR POSITION . 71EXEC SQL.L AST ROW COUNT . 72EXEC SQL.L AST SQL FUNCTION CODE . 74EXEC SQL.L AST ERROR CODE . 75EXEC SQL.L AST ERROR MESG . 76TIP. 77CHANGING THE PRIMARY DATABASE CONNECTION . 77LIST PACKAGE. . . 78LIST PACKAGE . 78LIST.APPENDITEM . 78ii

LIST.DESTROY. 79LIST.DELETEITEM . 79LIST.FAIL . 80LIST.GETITEM . 80LIST.INSERTITEM . 80LIST.LISTOFCHAR . 81LIST.MAKE . 81LIST.NITEMS . 82LIST.PREPENDITEM . 82OLE2 PACKAGE. . . 84OLE2 PACKAGE . 84OLE2.A DD ARG . 84OLE2.A DD ARG OBJ. 85OLE2.C REATE ARGLIST . 86OLE2.C REATE OBJ . 86OLE2.D ESTROY ARGLIST . 87OLE2.G ET CHAR PROPERTY . 87OLE2.G ET NUM PROPERTY . 88OLE2.G ET OBJ PROPERTY . 89OLE2.INVOKE . 89OLE2.INVOKE NUM . 90OLE2.INVOKE CHAR . 90OLE2.INVOKE OBJ . 91OLE2.ISSUPPORTED . 92OLE2.L AST EXCEPTION . 92OLE2.L IST TYPE. 94OLE2.OBJ TYPE . 94OLE2.OLE E RROR . 95OLE2.OLE N OT SUPPORTED . 95OLE2.RELEASE OBJ . 96OLE2.S ET PROPERTY. 96ORA FFI PACKAGE . . . 98ORA FFI PACKAGE . 98ORA FFI.FFI ERROR . 98ORA FFI.FIND FUNCTION . 99ORA FFI.FIND LIBRARY . 100ORA FFI.FUNCHANDLETYPE . 100ORA FFI.GENERATE FOREIGN . 101ORA FFI.IS NULL PTR . 102ORA FFI.LIBHANDLETYPE . 103ORA FFI.LOAD LIBRARY . 104ORA FFI.POINTERTYPE. 105iii

ORA FFI.REGISTER FUNCTION . 105ORA FFI.REGISTER PARAMETER . 107ORA FFI.REGISTER RETURN . 108ORA FFI.UNLOAD LIBRARY . 110ORA NLS PACKAGE. . 116ORA NLS PACKAGE . 116ORA NLS.AMERICAN . 116ORA NLS.AMERICAN DATE. 117ORA NLS.BAD ATTRIBUTE. 117ORA NLS.GET LANG SCALAR. 118ORA NLS.GET LANG STR . 118ORA NLS.LINGUISTIC COLLATE . 119ORA NLS.LINGUISTIC SPECIALS . 120ORA NLS.MODIFIED DATE FMT . 120ORA NLS.NO ITEM . 121ORA NLS.NOT FOUND . 121ORA NLS.RIGHT TO LEFT . 122ORA NLS.SIMPLE CS. 122ORA NLS.SINGLE BYTE . 123ORA PROF PACKAGE . . 124ORA PROF PACKAGE . 124ORA PROF.BAD TIMER . 124ORA PROF.CREATE TIMER . 125ORA PROF.DESTROY TIMER . 125ORA PROF.ELAPSED TIME . 126ORA PROF.RESET TIMER . 126ORA PROF.START TIMER . 127ORA PROF.STOP TIMER . 128TEXT IO PACKAGE. . . 130TEXT IO PACKAGE . 130TEXT IO.FCLOSE . 130TEXT IO.FILE TYPE . 131TEXT IO.FOPEN . 131TEXT IO.IS OPEN . 132TEXT IO.GET LINE. 132TEXT IO.NEW LINE . 133TEXT IO.PUT . 134TEXT IO.PUTF. 135TEXT IO.PUT LINE. 136TOOL ENV PACKAGE . . 138TOOL ENV PACKAGE . 138TOOL ENV.GETVAR . 138iv

TOOL ERR PACKAGE . . 140TOOL ERR PACKAGE . 140TOOL ERR.CLEAR . 140TOOL ERR.CODE . 140TOOL ERR.ENCODE . 141TOOL ERR.MESSAGE . 142TOOL ERR.NERRORS . 142TOOL ERR.POP . 143TOOL ERR.TOOL ERROR . 143TOOL ERR.TOPERROR . 144TOOL RES PACKAGE. . 146TOOL RES PACKAGE . 146TOOL RES.BAD FILE HANDLE . 146TOOL RES.BUFFER OVERFLOW. 147TOOL RES.FILE NOT FOUND. 147TOOL RES.NO RESOURCE . 148TOOL RES.RFCLOSE . 149TOOL RES.RFHANDLE . 150TOOL RES.RFOPEN . 150TOOL RES.RFREAD . 151v

We Appreciate Your CommentsReader’s Comment Form - A73152-01Oracle Corporation welcomes your comments about this manual’s quality andusefulness. Your feedback is an important part of our revision process. Did you find any errors? Is the information presented clearly? Are the examples correct? Do you need more examples? What features did you like?If you found any errors or have any other suggestions for improvement, pleasesend your comments by e-mail to oddoc@us.oracle.com.Thank you for your help.vii

PrefaceWelcome to Release 6i of the Oracle Forms Developer andOracle Reports Developer: Common Built-in Packages .This reference guide includes information to help youeffectively work with Forms Developer and containsdetailed information about its built-in packages.This preface explains how this user’s guide is organized andintroduces other sources of information that can help youuse Forms Developer.ix

PrerequisitesYou should be familiar with your computer and itsoperating system. For example, you should knowthe commands for deleting and copying files andunderstand the concepts of search paths,subdirectories, and path names. Refer to yourMicrosoft Windows 95 or NT and DOS productdocumentation for more information.You should also understand the fundamentals ofMicrosoft Windows, such as the elements of anapplication window. You should also be familiarwith such programs as the Explorer, Taskbar orTask Manager, and Registry.Notational ConventionsThe following typographical conventions are usedin this guide:ConventionMeaningfixed-width fontText in a fixed-width font indicatescommands that you enter exactly asshown. Text typed on a PC is notcase-sensitive unless otherwisenoted.In commands, punctuation otherthan brackets and vertical bars mustbe entered exactly as shown.xlowercaseLowercase characters in a commandstatement represent a variable.Substitute an appropriate value.UPPERCASEUppercase characters within the textrepresent command names, SQLreserved words, and keywords.boldfaceBoldface is used to indicate userinterface items such as menu choices

and buttons.C C represents the DOS prompt. Yourprompt may differ.Related PublicationsYou may also wish to consult the following Oracledocumentation:TitlePartNumberOracle Forms Developer and OracleReports Developer: Guidelines for BuildingApplicationsA73073SQL*Plus User's Guide and Refer

Oracle Forms Developer and Oracle Reports Developer Common Built-in Packages Release 6i January, 2000 Part No. A73152-01File Size: 337KB