Siebel VB Language Reference Version 8.0 December 2006
Total Page:16
File Type:pdf, Size:1020Kb
Siebel VB Language Reference Version 8.0 December 2006 Copyright © 2005, 2006, Oracle. All rights reserved. The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error- free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. PRODUCT MODULES AND OPTIONS. This guide contains descriptions of modules that are optional and for which you may not have purchased a license. Siebel’s Sample Database also includes data related to these optional modules. As a result, your software implementation may differ from descriptions in this guide. To find out more about the modules your organization has purchased, see your corporate purchasing agent or your Siebel sales representative. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS. Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065. The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party. Contents Siebel VB Language Reference 1 Chapter 1: What’s New in This Release Chapter 2: Siebel VB Overview Supported Uses of Siebel VB 17 Typographic Conventions Used in Siebel VB Language Reference 18 Chapter 3: Quick Reference: VB Statements and Functions Arrays in VB 19 VB Compiler Directives 20 Control Flow in VB 20 VB Date and Time Functions 21 Declarations in VB 22 VB Environment Control 23 VB Error Handling 24 VB File Functions: Disk and Folder Control 25 VB File Functions: File Control 25 VB File Functions: File Input/Output 26 VB Math Functions: Financial Functions 27 VB Math Functions: Numeric Functions 27 VB Math Functions: Trigonometric Functions 28 Objects in VB 29 ODBC Functions in VB 29 VB Strings: String Functions 30 VB Strings: String Conversions 31 Variants in VB 32 Chapter 4: Siebel VB Language Overview Visual Basic Programming Hints 33 Siebel VB Language Reference Version 8.0 3 Contents ■ Conventions Used by Siebel VB 36 Arguments in VB (Visual Basic) 36 Named Arguments 37 Siebel VB Comments 37 Visual Basic Data Types 38 Arrays in VB 38 Numbers 39 Records 39 Strings 40 Type Characters 40 Data Type Conversions in VB 40 Dynamic Arrays in Visual Basic (VB) 41 Visual Basic (VB) Variant Data Type 42 Visual Basic (VB) Expressions 43 Numeric Operators 43 String Operators 43 Comparison Operators (Numeric and String) 44 Logical Operators 44 Object Handling in VB 44 Creating an Object Variable to Access the Object 45 Using Methods and Properties to Act on Objects 46 Error Handling in Siebel Visual Basic (VB) 46 Trapping Errors Returned by Siebel Visual Basic (VB) 46 Option 1: Trap Errors Within Body of Code 47 Option 2: Trap Errors Using an Error Handler 47 Trapping User-Defined, Non-Siebel VB Errors 48 Trapping Errors Generated by Siebel VB Methods 49 Siebel VB and Unicode 49 Chapter 5: VB Language Reference Abs Function 51 ActivateField Method 52 ActivateMultipleFields Method 52 ActiveBusObject Method 52 ActiveViewName Method 52 AddChild Method 53 4 Siebel VB Language Reference Version 8.0 Contents ■ Application_Close Event 53 Application_InvokeMethod Event 53 Application_Navigate Event 53 Application_PreInvokeMethod Event 53 Application_PreNavigate Event 53 Application_Start Event 53 Asc Function 54 Associate Method 54 Atn Function 54 BusComp Method 55 BusComp_Associate Event 56 BusComp_ChangeRecord Event 56 BusComp_CopyRecord Event 56 BusComp_DeleteRecord Event 56 BusComp_InvokeMethod Event 56 BusComp_NewRecord Event 56 BusComp_PreAssociate Event 56 BusComp_PreCopyRecord Event 57 BusComp_PreDeleteRecord Event 57 BusComp_PreGetFieldValue Event 57 BusComp_PreInvokeMethod Event 57 BusComp_PreNewRecord Event 57 BusComp_PreQuery Event 57 BusComp_PreSetFieldValue Event 57 BusComp_PreWriteRecord Event 58 BusComp_Query Event 58 BusComp_SetFieldValue Event 58 BusComp_WriteRecord Event 58 BusObject Method 58 Call Statement 58 CCur Function 61 Siebel VB Language Reference Version 8.0 5 Contents ■ CDbl Function 62 ChDir Statement 63 ChDrive Statement 64 Chr Function 65 CInt Function 66 ClearToQuery Method 67 Clipboard Methods 67 CLng Function 68 Close Statement 69 Const Statement 70 Copy Method 71 Cos Function 71 CreateObject Function 72 CSng Function 74 CStr Function 75 CurDir Function 77 CurrencyCode Method 78 CVar Function 78 CVDate Function 79 Date Function 80 Date Statement 81 DateSerial Function 82 DateValue Function 83 Day Function 84 DeactivateFields Method 85 Declare Statement 85 Deftype Statement 88 DeleteRecord Method 89 Dim Statement 89 Dir Function 93 Do...Loop Statement 95 6 Siebel VB Language Reference Version 8.0 Contents ■ Environ Function 96 Eof Function 97 Erase Statement 98 Erl Function 100 Err Function 101 Err Statement 102 Error Function 103 Error Statement 104 ExecuteQuery Method 105 ExecuteQuery2 Method 105 Exit Statement 105 Exp Function 106 FileAttr Function 107 FileCopy Statement 109 FileDateTime Function 110 FileLen Function 111 FirstRecord Method 112 Fix Function 112 For...Next Statement 113 Format Function 114 FreeFile Function 122 Function...End Function Statement 123 FV Function 125 Get Statement 126 GetAssocBusComp Method 128 GetAttr Function 128 GetBusComp Method 129 GetBusObject Method 129 GetChild Method 129 GetChildCount Method 130 GetFieldValue Method 130 Siebel VB Language Reference Version 8.0 7 Contents ■ GetFirstProperty Method 130 GetFormattedFieldValue Method 130 GetMultipleFieldValues Method 130 GetMVGBusComp Method 130 GetNamedSearch Method 130 GetNextProperty Method 131 GetObject Function 131 GetPicklistBusComp Method 133 GetProfileAttr Method 133 GetProperty Method 133 GetPropertyCount Method 133 GetSearchExpr Method 133 GetSearchSpec Method 133 GetService Method 134 GetSharedGlobal Method 134 GetType Method 134 GetUserProperty Method 134 GetValue Method 134 GetViewMode Method 134 Global Statement 134 GoTo Statement 138 GotoView Method 139 Hex Function 140 Hour Function 140 If...Then...Else Statement 141 Input Function 143 Input Statement 143 InsertChildAt Method 145 InStr Function 145 Int Function 147 InvokeMethod Method 149 8 Siebel VB Language Reference Version 8.0 Contents ■ IPmt Function 149 IRR Function 150 Is Operator 151 IsDate Function 152 IsEmpty Function 153 IsMissing Function 154 IsNull Function 155 IsNumeric Function 156 Kill Statement 157 LastRecord Method 158 LBound Function 159 LCase Function 160 Left Function 161 Len Function 162 Let (Assignment Statement) 163 Like Operator 164 Line Input Statement 165 Loc Function 167 Lock Statement 168 Lof Function 170 Log Function 171 LoginId Method 172 LoginName Method 172 LookupMessage Method 172 Lset Statement 172 LTrim Function 173 Me Object 174 Mid Function 175 Mid Statement 176 Minute Function 178 MkDir Statement 179 Siebel VB Language Reference Version 8.0 9 Contents ■ Month Function 181 Name Method 182 Name