tools for visual basic

Upload: raul-marmol

Post on 07-Aug-2018

252 views

Category:

Documents


6 download

TRANSCRIPT

  • 8/20/2019 Tools for Visual Basic

    1/438

     

    Microsoft® Business Solutions–Solom

    Tools for Visual BasicRelease 6

     

  • 8/20/2019 Tools for Visual Basic

    2/438

     

  • 8/20/2019 Tools for Visual Basic

    3/438

     

    Microsoft ®  Business Solutions–Solo

    Tools for Visual Bas

    Release

    RPMN-TVB0-0

  • 8/20/2019 Tools for Visual Basic

    4/438

     

    Copyright  Manual copyright © 2004 Great Plains Software, Inc. All rights reserved. Great PlainSoftware, Inc. is a wholly-owned subsidiary of Microsoft Corporation.

    Your right to copy this documentation is limited by copyright law and the terms of th

    software license agreement. As the software licensee, you may make a reasonablenumber of copies or printouts for your own use. Making unauthorized copies,

    adaptations, compilations, or derivative works for commercial distribution is prohibited and constitutes a punishable violation of the law.

    Trademarks  Great Plains, Dynamics, eEnterprise, Dexterity, Solomon IV, and Solomon Softwareare either registered trademarks or trademarks of Great Plains Software, Inc. in theUnited States and/or other countries. Great Plains Software, Inc. is a wholly-owned

    subsidiary of Microsoft Corporation. Microsoft, ActiveX, BackOffice, BizTalk,FrontPage, JScript, Outlook, SourceSafe, Verdana, Visual Basic, Visual C++, Visua

    C#, Visual InterDev, Visual SourceSafe, Visual Studio, Win32, Windows, and

    Windows NT are either registered trademarks or trademarks of Microsoft Corporatioin the United States and/or other countries.

    The names of actual companies and products mentioned herein may be trademarks oregistered marks - in the United States and/or other countries - of their respective

    owners.

    The example companies, organizations, products, domain names, e-mail addresses,logos, people, places, and events depicted herein are fictitious. No association with a

    real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred.

    Warranty disclaimer   Great Plains Software, Inc. and Microsoft Corporation disclaim any warrantyregarding the sample code contained in this documentation, including the warrantiesmerchantability and fitness for a particular purpose.

    Limitation of liability  The content of this manual is furnished for informational use only, is subject to chan

    without notice, and should not be construed as a commitment by Great PlainsSoftware, Inc. or Microsoft Corporation. Great Plains Software, Inc. and Microsoft

    Corporation assume no responsibility or liability for any errors or inaccuracies thatmay appear in this manual. Neither Great Plains Software, Inc., Microsoft Corporatio

    nor anyone else who has been involved in the creation, production or delivery of thisdocumentation shall be liable for any indirect, incidental, special, exemplary or

    consequential damages, including but not limited to any loss of anticipated profit or benefits, resulting from the use of this documentation or sample code.

    License agreement  Use of this product is covered by a license agreement provided with the software product. If you have any questions, please call the Microsoft Business SolutionsCustomer Assistance Department at 800-456-0025 or 701-281-6500.

    Publication date  June 2004

    Part number RPMN-TVB0-0000600

  • 8/20/2019 Tools for Visual Basic

    5/438

      Introduction

    Table of Contents

    Introduction About This Manual ........................................................................................................................

    Module Overview...........................................................................................................................Benefits of Using Tools for Visual Basic.......................................................................................

    Setting Up a Development Environment........................................................................................Developer Guidelines for VB Tools...............................................................................................

    The VB Development Environment ................................................................................

    Screen Design ..................................................................................................................Database Considerations..................................................................................................

    Special Application Requirements

    Passing Parameters Between Solomon Applications .....................................................................Using Parameter-Passing Functions.................................................................................

    Building and Passing Parameters.....................................................................................

    Retrieving Parameters......................................................................................................Creating Applications Compatible with Customization Manager..................................................

    Using Required Components ...........................................................................................Using Required Coding Practices ....................................................................................

    Using Supported Solomon Controls ................................................................................Ensuring Customization Manager Usability ....................................................................

    Testing Applications........................................................................................................Displaying Text in the VB Tools Status Bar..................................................................................

    Providing Database Configuration and Import Definition Files with Applications .......................Overview of the Configuration File.................................................................................[Scenarios] Section ..........................................................................................................

    [Scenario#] Sections ........................................................................................................[MSSQL System Scripts] and [MSSQL Applications Scripts]........................................

    [Update Scenarios] Section..............................................................................................

    [Update ScenarioX] Section ............................................................................................Import File Format...........................................................................................................

    Implementing Windows Help in Solomon Applications................................................................

    Setting Up Help for Use with Solomon ...........................................................................Understanding Solomon Help Requirements...................................................................

    Building Help Files..........................................................................................................Enabling Help in Applications.........................................................................................

  • 8/20/2019 Tools for Visual Basic

    6/438

    iv Tools for Visual Basic®

    Utilities and Add-Ins

    Migrating from VB 3.0 or 4.0, to 5.0 ....................................................................................................

    Adding Custom Controls.......................................................................................................................Adding a Control Using the Dictionary Browse Utility..........................................................

    More about the Detail Level ...................................................................................................

    Pasting a Control onto a Form from the VB Toolbox.............................................................Defining New Tables.............................................................................................................................

    Defining New Fields .............................................................................................................................Creating Tables .....................................................................................................................................

    Solomon Standard File Extensions .........................................................................................Defining the Table Name and Fields.......................................................................................

    Generating a SQL CREATE TABLE Script File and DH File ...............................................Creating the Table in the Database .........................................................................................

    Creating a Unique Index on the New Table............................................................................

    Creating and Executing a Stored Procedure............................................................................Checking Code ......................................................................................................................................

    Using the VB Code Inspector .................................................................................................Validating Data-Binding Values on Manually Bound Controls..............................................Checking for Required Solomon Controls, References, and Forms........................................

    Changing the Default Processing Configuration.....................................................................

    The VB Code Inspector Log File ............................................................................................Required Fields .....................................................................................................................................

    Adding Your Applications to the Solomon Menu System ....................................................................The Parent Application ...........................................................................................................

    Delta.mnu.................................................................................................................................6

    System Database Tables..........................................................................................................Maintenance Screens...............................................................................................................

    Reference Controls..................................................................................................................................................7

    SAFDate Control ....................................................................................................................

    SAFFloat Control....................................................................................................................

    SAFInteger Control.................................................................................................................SAFMaskedText Control ........................................................................................................

    SAFGrid Control.....................................................................................................................

    SAFCheck Control..................................................................................................................SAFCombo Control ................................................................................................................

    SAFOption Control.................................................................................................................

    SAFUpdate Control.................................................................................................................

    Properties................................................................................................................................................8Alignment Property.................................................................................................................BackColor Property.................................................................................................................

    BlankErr Property ...................................................................................................................

    Caption Property .....................................................................................................................ColsFrozen Property ...............................................................................................................

    Custom Property Page.............................................................................................................

  • 8/20/2019 Tools for Visual Basic

    7/438

      Introduction

    Customizable Property.....................................................................................................

    DBNav Property ..............................................................................................................

    DecimalPlaces Property...................................................................................................Default Property...............................................................................................................

    DragIcon Property............................................................................................................

    DragMode Property .........................................................................................................Enabled Property..............................................................................................................

    FalseText Property...........................................................................................................FieldClass Property..........................................................................................................

    Flex Key Fieldclasses ......................................................................................................

     Non-Flex Key Fieldclasses ..............................................................................................FieldName Property.........................................................................................................

    Font Property ...................................................................................................................ForeColor Property ..........................................................................................................

    Heading Property .............................................................................................................Height Property................................................................................................................

    HelpContextID Property ..................................................................................................Index Property..................................................................................................................

    InGrid Property................................................................................................................

    Left Property....................................................................................................................Level Property..................................................................................................................

    Levels Property................................................................................................................

    List Property ....................................................................................................................Mask Property..................................................................................................................

    Max Property ...................................................................................................................Min Property....................................................................................................................

    MouseIcon Property.........................................................................................................

    MousePointer Property ....................................................................................................

     Name Property................................................................................................................. NoteButton Property ........................................................................................................

     NoteColumn Property ......................................................................................................PV Property .....................................................................................................................

    Separator Property ...........................................................................................................Spin Property ...................................................................................................................

    SpinIncrement Property ...................................................................................................TabIndex Property ...........................................................................................................

    TabStop Property .............................................................................................................Tag Property ....................................................................................................................

    ToolTipText Property ......................................................................................................

    Top Property ....................................................................................................................Trigger Property...............................................................................................................

    TrueText Property............................................................................................................

    Visible Property ...............................................................................................................WhatsThisHelpID Property .............................................................................................

    Width Property.................................................................................................................

  • 8/20/2019 Tools for Visual Basic

    8/438

    vi Tools for Visual Basic®

    Events...................................................................................................................................................14

    Cancel Event ..........................................................................................................................1

    Chk Event...............................................................................................................................1Default Event .........................................................................................................................1

    Delete Event...........................................................................................................................1

    DragDrop Event .....................................................................................................................1DragOver Event .....................................................................................................................1

    Finish Event ...........................................................................................................................1GotFocus Event......................................................................................................................1

    LineChk Event .......................................................................................................................1

    LineGotFocus Event ..............................................................................................................1LostFocus Event.....................................................................................................................1

    MemoryLoad Event ...............................................................................................................1MouseDown Event.................................................................................................................1

    MouseMove Event .................................................................................................................1MouseUp Event .....................................................................................................................1

     NewLevel Event.....................................................................................................................1Update Event..........................................................................................................................1

    Methods................................................................................................................................................17

    AboutBox Method .................................................................................................................1Drag Method ..........................................................................................................................1

    Move Method.........................................................................................................................1

    SetFocus Method ...................................................................................................................1ShowWhatsThis Method........................................................................................................1

    ZOrder Method ......................................................................................................................1Solomon API Function Calls................................................................................................................1

    ApplGetParms Function.........................................................................................................1

    ApplGetParmValue Function.................................................................................................1

    ApplGetReturnParms Function..............................................................................................1ApplInit Statement.................................................................................................................1

    ApplSetFocus Statement........................................................................................................1ApplSetParmValue Statement................................................................................................1

    AutoNbrDefault Function ......................................................................................................1Button_Form_Change Statement...........................................................................................1

    Button_Level_Change Statement...........................................................................................1CallApplic Statement.............................................................................................................1

    CallApplicWait Statement .....................................................................................................1CallChks Statement................................................................................................................1

    ChkCuryRateType Function ..................................................................................................1

    CurrencyField Statement........................................................................................................1CurrencyInfo Statement .........................................................................................................1

    CuryEffDateSet Statement.....................................................................................................1

    CuryFieldCalcSet Statement..................................................................................................2CuryInfoEnable Statement.....................................................................................................2

    CuryInfoGet Statement ..........................................................................................................2CuryInfoInit Statement ..........................................................................................................2

    CuryIdSet Statement ..............................................................................................................2

  • 8/20/2019 Tools for Visual Basic

    9/438

      Introduction

    CuryInfoSet Statement.....................................................................................................

    CuryRateTypeSet Statement............................................................................................

    CurySelFieldEnable Statement ........................................................................................DateCheck Function ........................................................................................................

    DateCmp Function...........................................................................................................

    DateMinusDate Function.................................................................................................DatePlusDays Statement..................................................................................................

    DatePlusMonthSetDay Statement....................................................................................DateToIntlStr Function ....................................................................................................

    DateToStr Function..........................................................................................................

    DateToStrSep Function....................................................................................................DBNavFetch Functions....................................................................................................

    DecimalPlaces Statement.................................................................................................DetailLoad Statement.......................................................................................................

    DetailSave Statement.......................................................................................................DetailSetup Functions......................................................................................................

    DetailSetupExtend Function ............................................................................................DispField Statements .......................................................................................................

    DispForm Statement ........................................................................................................

    DisplayMode Statement...................................................................................................DisplayModeSetProps Statement.....................................................................................

    DParm Function...............................................................................................................

    ExportCustom Function...................................................................................................FPAdd Function...............................................................................................................

    FParm Function................................................................................................................FPDiv Function................................................................................................................

    FPMult Function..............................................................................................................

    FPRnd Function ...............................................................................................................

    FPSub Function................................................................................................................FtoA Function..................................................................................................................

    GetCuryRate Statement ...................................................................................................GetModulePeriod Function..............................................................................................

    GetPrecCury Function .....................................................................................................GetPrecision Function......................................................................................................

    GetSqlType Function.......................................................................................................GetSWIMDefaultPrintInfo Function ...............................................................................

    GetSWIMPrintInfo Function ...........................................................................................GetSysDate Statement .....................................................................................................

    GetSysTime Statement.....................................................................................................

    Grid_Sortable Statement..................................................................................................HideForm Statement........................................................................................................

    HideNoteButtons Statement.............................................................................................

    ImportCustom Function...................................................................................................IncrStrg Statement ...........................................................................................................

    InitLocalizationSubsystem Function................................................................................IntlStrToDate Statement ..................................................................................................

    IParm Function ................................................................................................................

  • 8/20/2019 Tools for Visual Basic

    10/438

    viii Tools for Visual Basic®

    IS_AppServer Function..........................................................................................................2

    IS_TI Function.......................................................................................................................2

    IsMultiCompany Function .....................................................................................................2Level_SetDefaults Statement.................................................................................................2

    LoadForm Statement..............................................................................................................2

    LoadStr Function ...................................................................................................................2Localize Statement.................................................................................................................2

    MArrayCnt Function..............................................................................................................2MCallChks Statement ............................................................................................................2

    MClear Statement ..................................................................................................................2

    MClose Statement..................................................................................................................2MDelete Function ..................................................................................................................2

    MDisplay Statement...............................................................................................................2Mess Statement ......................................................................................................................2

    MessBox Statement................................................................................................................3Messf Statement.....................................................................................................................3

    MessGetText Function...........................................................................................................3MessResponse Function.........................................................................................................3

    MFirst Function .....................................................................................................................3

    MGetDelHandle Function......................................................................................................3MGetLineStatus Function......................................................................................................3

    MGetRowNum Function........................................................................................................3

    MInsert Statement..................................................................................................................3MKey Statement ....................................................................................................................3

    MKeyFind Function...............................................................................................................3MKeyFld Statement...............................................................................................................3

    MKeyHctl Statement..............................................................................................................3

    MKeyOffset Statement ..........................................................................................................3

    MLast Function......................................................................................................................3MLoad Statement...................................................................................................................3

    MNext Function.....................................................................................................................3MOpen Functions...................................................................................................................3

    MPrev Function .....................................................................................................................3MSet Statement......................................................................................................................3

    MSetLineStatus Function.......................................................................................................3MSetProp Statement ..............................................................................................................3

    MSetRow Statement ..............................................................................................................3MSort Statement ....................................................................................................................3

    MUpdate Statement................................................................................................................3

     NoteCopy Function................................................................................................................3PasteTemplate Function.........................................................................................................3

    PeriodCheck Function............................................................................................................3

    PeriodMinusPeriod Function .................................................................................................3PeriodPlusPerNum Function..................................................................................................3

    PVChk Function.....................................................................................................................3PVChkFetch Functions ..........................................................................................................3

    SaveTemplate Statement........................................................................................................3

  • 8/20/2019 Tools for Visual Basic

    11/438

      Introduction

    ScreenExit Statement.......................................................................................................

    ScreenInit Statement........................................................................................................

    SDelete Statement............................................................................................................SDeleteAll Function ........................................................................................................

    SetAddr Statement ...........................................................................................................

    SetAutoNbrFlag Statement ..............................................................................................SetButton Statement ........................................................................................................

    SetDefaults Statement......................................................................................................SetKeysEnabledOnly Statement ......................................................................................

    SetLevelChg Statement....................................................................................................

    SetProps Statement ..........................................................................................................SetRestart Statement........................................................................................................

    SetStatusBarText .............................................................................................................SetSWIMPrintInfo Function............................................................................................

    SetTI_Alias_Level Statement ..........................................................................................SFetch Functions..............................................................................................................

    SGroupFetch Functions ...................................................................................................SInsert Statements............................................................................................................

    SParm Function................................................................................................................

    Sql Statement...................................................................................................................SqlCursor Statement ........................................................................................................

    SqlCursorEx.......................................................................................................................

    SqlErr Function................................................................................................................SqlErrException Statement..............................................................................................

    SqlExec Statement ...........................................................................................................SqlFetch Functions ..........................................................................................................

    SqlFree Statement............................................................................................................

    SqlNoWait Statement ......................................................................................................

    SqlRowCntrs Statement...................................................................................................SqlSubst Statement ..........................................................................................................

    Status Statement...............................................................................................................StrToDate Statement........................................................................................................

    StrToTime Statement.......................................................................................................SUpdate Statements .........................................................................................................

    SwimGetProfile Function ................................................................................................SwimWriteProfile Function.............................................................................................

    TestLevelChg Function....................................................................................................TimeToStr Function.........................................................................................................

    TranAbort Statement........................................................................................................

    TranBeg Statement ..........................................................................................................TranEnd Statement ..........................................................................................................

    TranStatus Function.........................................................................................................

    Appendix: Toolset Limitations

    Solomon Tools for Visual Basic Limitations.................................................................................

  • 8/20/2019 Tools for Visual Basic

    12/438

    x Tools for Visual Basic®

  • 8/20/2019 Tools for Visual Basic

    13/438

      Introduction

    Introduction

    About This ManualTo help you quickly become productive with Tools for Visual Basic®, MicrosofBusiness Solutions requires completion of the hands-on Tools for Visual Basic t

    course. This course helps you achieve maximum return on your investment in TVisual Basic, and this manual is organized based on the assumption that you hav

    already attended this course. It is advisable that you periodically refer to the Too

    Visual Basic® Solomon® Training manual for hands-on reinforcement on the top

    this manual.

    Module OverviewThe Microsoft Business Solutions–Solomon Tools for Visual Basic® is the same

    development platform used by Microsoft Business Solutions to create Solomon.

    tools allow you to leverage your existing knowledge of Microsoft SQL Server anVisual Basic to create a tightly integrated, complete line of business application

    Benefits of Using Tools for Visual BasicThere are many reasons for using the Tools for Visual Basic. Following is a list some of the main benefits you will gain from using these tools:

    • Common look and feel with the rest of Solomon

    If you want, your programs can be almost indistinguishable from the rest ofSolomon product. This includes full integration with the Solomon toolbar, F

    lookup, and standardized messaging.

    • Support for the Solomon Customization Manager module

    Users can customize your applications exactly the way they can customize e

    Solomon applications. Create source code that meets most of the needs of mdifferent clients or customers, then let them or their reseller apply the finish

    touches using Customization Manager!

    • Integration with Solomon’s robust security functionality

    By simply naming your program files correctly, making sure the caption on

    main form is correct, and inserting a single record into one of Solomon’s sytables, your application automatically supports Solomon’s standard security

    functionality. Without a single line of code, users can be given levels of acc

    your programs ranging from no access at all to full access.

  • 8/20/2019 Tools for Visual Basic

    14/438

    2 Tools for Visual Basic®

    • Built-in multi-user contention checking

    Probably one of the best features of these tools is that you are developing full

    featured, client/server applications for a system that can support from one tohundreds of simultaneous users. However, when you are writing your code, you

    can write as though you were developing a single-user, single-access system. Th

    is because the Solomon kernel has a built-in optimistic updating algorithm, whicautomatically handles cases in which more than one user or process attempts toupdate the same record, or logically related records at the same time. The system

    will automatically cancel changes from the second user, and display appropriate

    messages.

    • Speed of development

    Finally, after you’ve mastered Tools for Visual Basic, you will find that much o

    the standard, routine programming work required for all database applications ishandled automatically for you. This will make your development time significan

    shorter then with traditional PC-based development tools.

     Note that the referential integrity, data flow, and business rules are not incorporated either the Solomon kernel or the database itself. Maintaining the logical integrity of t

    data in the Solomon database is the responsibility of you, the programmer, althoughfeatures of the Tools make this easier.

    Setting Up a Development EnvironmentThere is no right or wrong way to configure your development environment. Thissection is intended to suggest an approach that may work for you.

    In setting up your environment, there are several issues you may want to consider:

    • There are many standard files that must be included in any Tools for Visual Bas

     project. Most of these files should never be modified.

    • Almost every data entry, maintenance, or process window you might need will probably be a completely separate executable.

    • You may be developing for multiple versions of Solomon.

    • You may be moving your development environment from one computer to anoth(for example, from a desktop to a laptop).

    • You may be using version control software such as Source Safe.

    Given these conditions, the directory structure shown in the following figure may beuseful to you. Notice that the directory is created with the same name as the applicati

    that is being developed and is contained within the same subdirectory as the Solomonsubdirectory.

    By using this structure, the VB project file can include the necessary common files

    from Solomon and Tools for Visual Basic development folders using relative paths. Afiles unique to the project can be centralized within the ST26000 directory.

  • 8/20/2019 Tools for Visual Basic

    15/438

      Introduction

    This structure facilitates moving the project to a different version of Solomon, omoving the project to a different computer. It also facilitates the use of version c

    software, which typically rely on a rigid directory structures for checking files inout.

    Project Sub

    directory is at the

    same level as theSol4 subdirectory

    VBProject.vbp

    Form1.frm are

    the project suband renamed to

    the project nam

     Figure 1: Suggested Directory Structure for a VB Project

  • 8/20/2019 Tools for Visual Basic

    16/438

    4 Tools for Visual Basic®

    Developer Guidelines for VB ToolsTools for Visual Basic (VB Tools) provides the development environment to create

    Solomon applications. It provides a collection of extensions and components that

     provide many of the common UI characteristics and global features that are availablethroughout Microsoft Business Solutions–Solomon.

    To take full advantage of many of these features, the application developer mustimplement development standards to ensure that these features can be used to their

    fullest extent and to ensure that the user experience is common throughout all Solomapplications.

    This section provide developers with a set of guidelines to ensure that applicationscreated with VB Tools compile, exhibit little or no unexpected behavior, and take

    optimal advantage of these VB Tools Global facilities:

    • Application server

    •Copy/paste

    • Customization manager

    • Detail grids

    • International localization

    • Mouse/keyboard conventions

    •  Notes

    • Object Model

    • Possible value windows

    • Process status window

    • Security model

    • Status bar

    • Templates

    • Toolbar navigation

    • Transaction Import

    • Required Fields notations

    The following sections describe the VB development environment, screen design, an

    database considerations.

  • 8/20/2019 Tools for Visual Basic

    17/438

      Introduction

    The VB Development Environment

    The following files are already included in the template project file, VBTProjectHowever, when creating a new project, it is up to the developer to ensure that th

    included in the project:• Applic.dh

    • Swim.bas

    • VbtApp.cls

    •  New_form.frm

    • Form1.frm

    • Swimapi.dll

    Note: These files should be installed in the Solomon\VT\VB5_DEV folder. If thnot there, add them using VB Code Inspector.

    The following references are required in every VB Tools project file:

    • SAF.OCX

    If this reference does not exist, VB Code Inspector cannot recognize the proa VB Tools application.

    • SAFDes.OCX

    If this reference is missing, add it using VB Code Inspector.

    • SAFCont.OCXIf this reference is missing, add it using VB Code Inspector.

    • TabCtl32.OCXIf this reference is missing, add it using VB Code Inspector.

    • CommandBars.OCX, version 8.7If this reference is missing, add it using the VBA IDE. A license for this con

    will need to be purchased by you from the vendor, Codejock Software.

    Screen Design

    Controls

    The following controls are required for a VB Tools project:

    •SAFContainer

    • SAFDesigner

    • SAFNewFrame

    • SAFNewTab

  • 8/20/2019 Tools for Visual Basic

    18/438

    6 Tools for Visual Basic®

    If these controls are missing, VB Code Inspector adds them. Do NOT change the properties of these controls. They are placed to the far left of the form (Left = -2000)

    they should never interfere with the development environment. If a property ischanged, Customization, or Notes may not function correctly. For VB Code Inspecto

    these properties are also inspected and may be changed if necessary.

    Update control — Only one Update control is allowed for a project. It is placed onForm1. This is checked by VB Code Inspector.

    CBegProcessing — For a process application to be available to the application serve

    a button control must exist on the form with the name cBegProcessing. This button i

    used to begin the process.

    Form1

    The Form1.Caption property must contain the .EXE name in parentheses in the formMyAppTitle (MM.SSS.SS) where the application name is MMSSSSS.EXE. Failure t

    follow this standard results in a runtime error saying that the application does not

    match the caption. This is checked by VB Code Inspector.

    Events

    The Form1 Form_Load events process in the following order.

    • LoadForm() calls

    • Applinit

    • SetAddr calls

    • SqlCursorEX calls

    • CurrencyInfo calls

    • ScreenInit

    • DetailSetup calls

    Form_Unload — ScreenExit(“”, “”) should be called here. The use of “End” insteadof this call does not “clean up” all of the objects created by Swim.

    Update1_Update — TranEnd should never be called from within the Update event.

    transaction begins just after the “UpdateStart” level in the Update1_Update event isexecuted.

    Levels are then processed from the header level to the most detailed level. If a Trane

    is called in an intermediate level when prior levels have already been processed, theearlier level data will be committed to the database without its corresponding detail

    level data.

    This is checked by VB Code Inspector.

    Tab_Click  — There should be no code in the Tab_Click events. In Customize Modethese events are not suppressed and result in unexpected behavior.

    This is optionally checked by VB Code Inspector if the “Customization CompatibilitInspection Option is selected.

  • 8/20/2019 Tools for Visual Basic

    19/438

      Introduction

    Button_Click  — Logical code in the Button_Click event that is used to populatsubform will not be processed in Transaction Import mode.

    Chk  — Code should not be placed in a Chk event that loads a subscreen, and enfields. This causes problems with Transaction Import.

    Because Transaction Import loads all subscreens at application load time, it doesknow that the fields will be enabled and will result in partial data being saved to

    database.

    Transaction Import — Special consideration needs to be made for TransactionImport when code exists in the Form_Load event of a subform that acts upon da

     previously entered in the main form.

    Because Transaction Import loads all subscreens at application load time, the daexpected is not available.

    Property Considerations

    SAFMaskedText — a Mask property is required for this control type. This is ch

     by VB Code Inspector. The Mask property should never be larger than the actuasize. That would result in the value for the control not displaying at all. This is c

     by VB Code Inspector.

    The Mask property should in most cases, match the length of the field defined fo

    control. If one application populates the full length and another application showa portion of that value, information is truncated, and if updated to other records t

    truncated value is passed along. This is optionally checked by VB Code Inspecto

    Warning Option for “Controls with a Mask that is smaller than the field’s defineis selected.

    Setting property values at runtime — Avoid using control.property = somevaCustomization Manager has no knowledge of properties set using this method. T

    correct method is to use the Setprops and/or MsetProp Solomon APIs. This isoptionally checked by VB Code Inspector if the Warning Option for “Explicit PAssignments vs SetProps” is selected.

    Triggers — The maximum number of controls with a trigger property that pointsingle control is 8.

    PV or DBNav property — If the stored procedure being used contains a LIKE

    keyword, the “wildcard” checkbox should be checked. The property should be populated for the last key field of every Navigation and Lookup level. This is

    optionally checked by VB Code Inspector if the Warning Option “No PV or DB property on last key field of Navigation level” is selected.

    The maximum number of parameters allowed for a PV or DBNav is 8. When paan integer parameter to DBNAV to retrieve multiple rows, use the BETWEENkeyword in the WHERE clause of the Select statement.

    Control Size — The size of all controls that contain text information (that is,SAFMaskedText, Labels, SAFCombo) should be 35% larger size than the Engli

    requires (for international language support).

  • 8/20/2019 Tools for Visual Basic

    20/438

    8 Tools for Visual Basic®

    Min and Max — If a field class of 124, 125, or 126 is specified for a SAFFloat fieldthe Min and Max property values should be filled with all 9s.

    If the Min and Max properties contain some other value, the correct precision stilldisplays, but when precision flexes to fewer than the number of decimal places in the

    Decimalplaces property, the field size does not expand into the extra digits.

    This is optionally checked by VB Code Inspector if the Warning Option “Controls w

    Improper Min and Max (values International)” is selected.

    Tab order

    The tabindex of a label that corresponds to a control should immediately precede thetabindex of that control. When using Hot Key mnemonics (i.e., &Detail) for control

     positioning, the Solomon kernel positions the cursor at the control whose tabindex

    value follows the tabindex value for the label where the hot key is identified. If this inot done and a user customizes the label to add a Hot Key, the cursor is positioned o

    the next SAFControl in tab order—not necessarily the next control visually.

    When in a grid screen, it is important to make the grid container (that is, Frame) thefirst tabindex value, then all controls and labels within the frame should have

    contiguous tabindex values. This is optionally checked by VB Code Inspector if theWarning Option “Tabindex values that jump out and back into a container” is selecte

    The tabindex should never be set to allow the cursor to move from inside the grid tooutside of the grid, then back into the grid. This is optionally checked by VB Code

    Inspector if the Warning Option “Tabindex values that jump out and back into a

    container” is selected.

    Levels

    The levels identified in the Level property of the Update control must match the leve

    specified in the SQLCursorEX calls.

    The data for this property is formatted so that the level identified as LEVEL0 should

    first. LEVEL1 second, and so forth. The choices for Level Type are:

    N: Normal Level.

    L: Lookup Level. This level must be preceded by an N Level.

    D: Detail Level. This level is associated with a grid.

    DA: Detail (application loaded). If the application uses DetailLoad to load thegrid, the Solomon kernel automatically handles the update. If the application doe

    not use DetailLoad, the application must handle all updates for this level manual

    C: Constant Level. Used when no database navigation is necessary for this level

    The same record is always displayed. This is checked by VB Code Inspector.

    Although you can have multiple D and DA levels, they should appear last in theLevel property unless the levels beyond the D or DA levels are intended to be no

    navigable. This is optionally checked by VB Code Inspector, by selecting theWarning Option “Order of Levels specified in Update Levels property”.

  • 8/20/2019 Tools for Visual Basic

    21/438

      Introduction

    The level property is formatted as:

    LEVEL0 alias;LevelType,LEVEL1 alias;LevelType

    The level alias has a maximum of 19 characters. This is checked by VB CodeInspector.

    Controls are templated in tab order within each level. Controls with a blank in th property are processed as LEVEL0. The maximum number of levels allowed is

    (LEVEL0 –LEVEL9). This is checked by VB Code Inspector.

    The maximum number of N(navigation) type levels is 2. This is checked by VB Inspector.

    The Level number in Setaddr must match the Level Number in SQLCursorEX. TCursor defined in SQLCursorEX must match the cursor defined in the DetailSet

    SetAddr calls

    A SetAddr call must be made for every record referenced by a control on the scrThis is checked by VB Code Inspector.

    Additional records that are accessed by the application do not require a SetAddrHowever, making a SetAddr call for the record, makes that record easily availab

    customization. Also, the use of the SetAddr call properly initializes the buffer tofor strings (instead of nulls). There is, however, a possible performance tradeoff

    making too many SetAddr calls.

    It is important for the second parameter of the SetAddr call (buffername) to be afollowed by the full table name. However, it is often necessary to retrieve to sep

    instances of the same table. When it is necessary to create a second buffer for thadditional instance, a number can be placed at the end of the btablename (that is

     bcustomer1). When this guideline is not followed, errors may occur in the applic

    GridsFor grid functionality, it is important for all controls contained within the grid as

    as the grid control itself, to be “contained” within the frame (or whatever containselected). This can be tested by attempting to move a control outside the frame t

    surrounds the grid data (in design mode).

    If the control cannot be moved outside the frame, it is contained within the fram

    can be moved outside the frame, these controls must be selected, then Cut, then

    on the frame and Paste. Keep in mind that this operation will probably alter thetabindex properties and they will need to be reset.

    The maximum number of grids per application is 10. This is checked by VB Cod

    Inspector. The maximum number of tables associated with a single grid is 16. No visual controls within a grid container should be placed outside the visual boundaries of that container. This approach makes controls visible in Grid view

    not in Form view. This is optionally checked by VB Code Inspector, if the Warn

    Option “Visible Controls outside the Grid container” is selected.

  • 8/20/2019 Tools for Visual Basic

    22/438

    10 Tools for Visual Basic®

    It is now possible to have an inquiry grid on the applications that can be sorted by thuser by clicking on the header of a column (see “Grid_Sortable Statement” on

     page 271).

    Memory arrays

    When looping through memory arrays in code, it is important that you preserve youroriginal position in the array and reset back to that position when you are finished withe loop. You do this with the MgetRowNum, and MsetRow functions. Failure to do

    this causes the application to display several errors about the memory array notmatching the grid. (that is, bulletproof 10061, 11008, 20007). It can also cause the C

    Copy-Paste function to fail.

    An application may have an unlimited number of memory arrays. The maximumnumber of keys allowed for a single memory array is 5.

    Messages

    The Solomon Message APIs should be used in all cases. Transaction Import is unabl

    to recognize and respond to VB message calls.Messages should never be hard-coded in an application. Messages.csv or an equivale

    method should be used, so that the messages may be translated if necessary.

    Avoid concatenating multiple messages. The syntax of many languages is different, translation of the individual pieces may be difficult.

    For process status messages, labels are often placed on the form with their visible property set to False. This way, the application can reference the control.caption

     property to display the message.

     Never display a messages during an open transaction. A transaction is open after a

    TranBeg has been called and inside the Update1_Update or Update1_Delete events.

     NEVER call TranEnd from within the Update1_Update event to allow a message to displayed.

    Status()

    Make status calls only in process applications. In these cases, the Solomon kernel do

    not set TranBeg automatically and will not interfere with these calls.

     Never make a status call in the Update1_Update Event. In this case, the Solomon

    kernel has already started a transaction. Placing a status call here would cause record page locking errors.

    Unique control names

    All controls within an application (including sub-forms) MUST have unique names.This is checked by VB Code Inspector.

    Key fields

    All Normal and Lookup levels should have at least one key field. This is optionally

    checked by VB Code Inspector if the Warning Option “No Key field defined for Navigation or Lookup level” is selected.

  • 8/20/2019 Tools for Visual Basic

    23/438

      Introduction

    All key fields (,k) should have their BlankErr properties set to True for “D” or “levels. This is checked by VB Code Inspector.

    The last key field for every level, must have its PV or DBNav property populateis optionally checked by VB Code Inspector if the Warning Option “No PV or

    DBNAV property on last key field of Navigation level” is selected.

    The maximum number of key fields per level is 5. This is checked by VB Code

    Inspector.

    Special coding considerations

    Lenb should be used in the following function calls:

    DBNavFetch1, DBNavFetch4, DBNavFetch8

    DetailSetup, DetailSetup8, DetailSetupExtend

    MOpen, MOpen8

    PVCheckFetch, PVCheckFetch4, PVCheckFetch8

    SetAddrSFetch1, SFetch4, SFetch8

    SGroupFetch1, SGroupFetch4, SGroupFetch8

    SInsert1, SInsert4, SInsert8

    SQLFetch1, SQLFetch4, SQLFetch8

    SUpdate1, SUpdate4, SUpdate8

    MkeyOffset

    This is checked by the Code Inspector.

    CallApplicWait - CallApplicWait will have trouble finding the .EXE if you don

    specify the full path relative to the Solomon folder.

    Unbound controls

    To define unbound controls place values in the Field Offset, Field Type, and Fie

    Length properties (on the Fieldname Property page).

    • If a value exists in any of these properties, VB Code Inspector identifies the

    control as unbound and attempts to calculate its offset. So, if you do not wanthis yourself, you can place a 99 in any of the properties, then run VB Code

    Inspector and it will calculate the values for you.

    • Even if the field is NOT unbound (that is, the table exists in the database), b

    values exist in the Field Offset, Field Type, or Field Length property, VB CInspector attempts to make the calculation. However, the Solomon kernel kthat the field is not unbound and these values are not used. This is checked b

    Code Inspector.

  • 8/20/2019 Tools for Visual Basic

    24/438

    12 Tools for Visual Basic®

    Third-party controls

    Third-party controls have limited properties that may be customized. They are not,however, accessed by templating, which raises issues with application server as well

     because templates are the way that application server fills the screen that is to be processed.

    In this case, data keyed into third party controls is not captured in the template andtherefore, is unavailable to the application server process. This is optionally checked

    VB Code Inspector if the Warning Option “Third Party controls used in theApplication” has been selected.

    VB Tools size limitations

    The VB Tolls size limitations are:

    • Maximum number of characters in a Table name is 17.

    • Maximum number of characters in a Column name is 20.

    • Maximum number of columns in a Table is 500.

    • Maximum length of a VB Tools control name is 30.

    • Maximum number of characters in a VB Tools Combo box List property is

    32,000.

    • Maximum size of one description line for VB Tools Combo box is 81.

    • Maximum number of bytes that can be written in a single insert or fetched in asingle fetch is 30,500.

    • Maximum number of database tables is 1000.

    • Maximum number of forms per project is 30.

    New Application Menu and ToolbarAll of the Solomon applications and the Sample application have the Menu and

    Toolbar on the applications. When placing the CommandBars control on the form, yMUST:

    • Place a Frame named MenuBarsFrm on the form.

    • Place the Toolbar control in that frame. The instance of the Toolbar control MU

     be named MenuBars.

    There is code in SWIM.BAS that repositions the Frame and interacts with the Toolbcontrol. For these references to work correctly, the names must match.

    The Literals, or captions for the items on the Toolbar, can be customized only byrecompiling the ToolBarenu.dll (source is part of the Localization Toolkit).

  • 8/20/2019 Tools for Visual Basic

    25/438

      Introduction

    Database Considerations

    Cursors

    The maximum number of cursors available to an application is 50; the maximumnumber of cursors available to customizations is 30.

    If a SQLCursor or SQLCursorEX call is not made for a cursor, it is automaticalldeclared as SQLReadOnly and is not freed automatically.

    SQLCursorEX is the preferred API call. It allows the application to specify addi parameters that optimize data access for SQL Server. This is optionally checked

    Code Inspector if the Warning option “Use of SQLCursor vs SQLCursorEX in tapplication” is selected.

    Indexes

    All Solomon database tables require a unique index, which is the full table name0 appended. (for example, Customer0).

    The maximum number of fields in an index is 8.

    Solomon database .DH files

    These files are available in the Solomon\DB\DHFiles folder for use in developinapplications that utilize Microsoft Business Solutions–Solomon database tables.

  • 8/20/2019 Tools for Visual Basic

    26/438

    14 Tools for Visual Basic®

  • 8/20/2019 Tools for Visual Basic

    27/438

      Special Application Requirements

    Special Application Requirements

    Passing Parameters Between Solomon ApplicationsThe Solomon kernel provides the ability to pass parameters between Solomon scand reports, customizations created with the Basic Script Language (BSL), and c

    applications developed with the Solomon Tools for Visual Basic.

    Each Solomon or VB Tools application is a separate executable program (EXE)

    enabling you to create a single solution comprised of two separate applications. example, you can implement custom “Drill Down” or “Quick Print” functionalit

    calling the appropriate executable or the Report Option Interpreter (ROI) with th

    specified parameters.

    The architecture to support this functionality is a “layered” design so that param passed using different methods remain isolated. This prevents parameters that aruse by two applications from being compromised if a BSL customization uses d

     parameters on the same applications. Transaction Import starts any target applic

    screen by using command line parameters and therefore must keep its own paramisolated, so that any parameters used by BSL or the underlying VB Tools applic

    are also not compromised.

    Using Parameter-Passing Functions

    Solomon provides the following functions to pass parameters using BSL or VB

    Function Where Available Description

    ApplSetParmValue  VB Tools, BSL Adds parameters to pass to an applica

    CallApplic  VB Tools Launches a second, modeless applicat

    CallApplicWait  VB Tools Launches a second, modal application

    Launch  BSL Launches a second application.

    ApplGetParmValue  VB Tools, BSL Retrieves parameters from the parame

    ApplGetParms  VB Tools, BSL Retrieves parameters from the comma

    ApplGetReturnParms  VB Tools Retrieves parameters from a terminate

    secondary VB Tools application.

    These functions allow parameters to be processed separately for VB Tools, BSLTI (Transaction Import) applications, and allow an application to access any partype from any other VB Tools, BSL, or TI application.

    After an application adds parameters, a temporary, uniquely named parameter fi

    (with a .PRM extension) is automatically created by the Solomon kernel. This ficontains the parameter values that are to be passed to the receiving program.

  • 8/20/2019 Tools for Visual Basic

    28/438

    16 Tools for Visual Basic®

    The parameter file is similar in format to a Windows INI file and contains sections,entries, and values. It is created in the Solomon program directory or the directory

    specified by the TempDirectory entry in the [Miscellaneous] section of the Solomonfile. After the called application has completed, the Solomon kernel deletes the

     parameter file.

     Note that an application can pass parameter values using a single command line strinconsisting of the name of the executable and the parameters to pass. However, thismethod is limited by the operating system maximum of 128 characters for a comman

    line.

    The CallApplic, CallApplicWait, and Launch functions all support the ability to pa parameters using the command line, and the ApplGetParms function can retrieve an

     parameter passed via the command line.

    To pass parameter information using a string of any length, use the ApplSetParmVal

    and ApplGetParmValue functions with the temporary parameter file.

    Building and Passing ParametersUse ApplSetParmValue to set the parameter values to be passed to anotherapplication. ApplSetParmValue allows you to specify the exact section, entry, and

    value in the parameter file.

    The first execution of this statement creates the temporary parameter file and sets thefirst parameters; subsequent executions of this statement within the same program ad

    additional parameters to the file.

    When the parameter file is complete, use CallApplicWait, CallApplic, or Launch t

    launch the other application. The file name of the parameter file is passed on thecommand line that calls the second application.

    The following examples show how to add a new section, entry, and parameter value a parameter file, and then call the second application:

    BSL

    Call ApplSetParmValue("[MyScreen]", "CustomerId", "C299")

    serr1 = Launch("0826000 ", True, True, 0)

    VB Tools

    Call ApplSetParmValue("[MyScreen]", "CustomerId", "C299")

    Call CallApplicWait(0826000)

    Either call to ApplSetParmValue above creates a parameter file with the following

    contents:[MyScreen]

    CustomerId=C299

  • 8/20/2019 Tools for Visual Basic

    29/438

      Special Application Requirements

    Retrieving Parameters

    Use ApplGetParmValue in the Load event of an application to retrieve values the parameter file passed from another application. ApplGetParmValue retriev

    section, entry, and value that was placed in the parameter file.The following examples show how to retrieve parameter values from a paramete

    BSL

    'Code for Form1_Display event of 08.260 Customer scree

    Dim PassedParm As String

    PassedParm = ApplGetParmValue("[MyScreen]", "CustomerI

    If Trim$(PassedParm) "" Then

    'Set field value only if parameter is not blank

    serr1 = SetObjectValue("ccustid", PassedParm)

    End If

    VB Tools

    'Code for Form1_Load event of 08.260 Customer screen

    Dim PassedParm As String

    PassedParm = ApplGetParmValue("[MyScreen]", "CustomerI

    If Trim$(PassedParm) "" Then

    'Set field value only if parameter is not blank

    bCustomer.CustId = PassedParm

    Call DispField(ccustid)

    End If

  • 8/20/2019 Tools for Visual Basic

    30/438

    18 Tools for Visual Basic®

    Creating Applications Compatible with Customization ManagerAny application developed with Solomon Tools for Visual Basic can be customized

    with Solomon Customization Manager. To support all features of Customization

    Manager, an application must conform to the following requirements.

    Using Required Components

    For an application to be customizable with Customization Manager, a VB Tools

     project must include the following components:

    Component Type Description

    Form1  Form Contains the Update control that determine

    whether an application can be customized.

    NEW_FORM.FRM  Form Used to add new form objects to an

    application.

    Update  Control On Form1, determines if the application ca

     be customized; to allow customization, set

    the property Update.Customizable to True;

    otherwise, set to False.

    SAFDesigner  Control Provides the user interface.

    SAFNewFrame

    (VB Frame Control) 

    Control Inserts new frames on a form.

    SAFNewTab

    (VB SSTab Control) 

    Control Inserts new tab controls on a form.

    SAFContainer  Control Inserts labels, text boxes, combo boxes,

    checkboxes, and command buttons.

    SolomonVBTApp  Class module Creates controls at runtime and calls the

    appropriate customization Help files in

    Customization Mode.

    All of the controls in the preceding table must be included on every form in the VB

    Tools project. Note that these controls are added to a project automatically by runninVB Code Inspector, and in this case their properties should not be modified.

    All of the required components are contained in the VB Tools project template file,

    VBTProject.vbp.

  • 8/20/2019 Tools for Visual Basic

    31/438

      Special Application Requirements

    Using Required Coding Practices

    To ensure that an application is customizable with Customization Manager, use following coding practices:

    • Do not modify the settings created by the VB Code Inspector for the requirecomponents previously listed.

    • Do not create code for the Click event for a Tab control.

    • Ensure that control names are unique across the project (including subforms

    • Ensure that all controls within a grid frame are within the coordinate bound

    the frame by following these property rules:

     — control .Top > 0

     — control .Left > 0

     — control .Top + control .Height

  • 8/20/2019 Tools for Visual Basic

    32/438

    20 Tools for Visual Basic®

    VB Tools SAF Wrapped Controls

    • SAFMaskText

    • SAFUpdate

    • SAFInteger

    • SAFDate

    • SAFFloat

    • SAFCombo

    • SAFCheck

    • SAFOption

    • SAFGrid

    In addition, Customization Manager provides customization support for some comm

     properties associated with any control, including third-party controls. These propertiinclude:

    • Left

    • Top

    • Height

    • Width

    • Enabled

    • Visible

    Ensuring Customization Manager Usability

    Use the following guidelines to promote a successful user experience for those using

    Customization Manager to customize your application.

    • Controls bound to Table.Field entries from the database are unavailable forinsertion by the Insert Object Wizard in Customization Manager. For example, i

    table contains 10 fields, and controls on your application are bound to 8 of thesefields, only the 2 unbound fields are available to the Insert Object Wizard. In the

    wizard, the user will see only tables that are bound programmatically through cowith a SetAddr( ) statement.

    • All controls that are secure at the application level cannot be unsecured through

    Customization Manager. Customization Manager can only be more restrictive, n

    less restrictive. Modifications to the properties of secured controls are allowed inCustomization Mode, but with the following restrictions:

     — A control whose Enabled property is set to False cannot be set to True.

     — A control whose Visible property is set to False cannot be set to True.

     — The BlankErr property of a required control cannot be changed.

  • 8/20/2019 Tools for Visual Basic

    33/438

      Special Application Requirements

     — Changes to the Minimum and Maximum values for a range can only nthe range.

     — List items cannot be added to combo box or text box controls if data alrexists in the List or PV property for these controls.

    •A hidden control that should not be customized by the user should be positithe far left of the form so it does not appear in Customization Mode. For exset the control’s Left property to a large negative number such as -2000. (Y

    cannot use this method to position a control within a grid frame.)

    • Avoid using labels with empty Caption properties.

    • Run VB Code Inspector on every build of your application and correct all efound. Most of the errors that Code Inspector is designed to detect are those

    cause subsequent errors when an end user attempts to customize the applica

    Keeping VB Code Inspector visible in the VB Add-ins menu ensures that yoautomatically prompted to run Code Inspector when creating an executable

    Testing ApplicationsTest your applications for Customization Manager compatibility. Load each form

    your application and select Customize Mode from the Solomon parent toolbar. Ghandles should appear around the form and no error message should be displaye

    All third-party controls should be tested in Customize Mode to determine if they

    customized without error. Select each control in Customize Mode and press F4 

    display the property window. The property window should display the limited p

    entries as described earlier (Left, Top, Height, Width, Enabled, and Visible).

  • 8/20/2019 Tools for Visual Basic

    34/438

    22 Tools for Visual Basic®

    Displaying Text in the VB Tools Status BarThe SetStatusBarText function is available for displaying text in the status bar of the

    application window. To facilitate language localization, avoid hardcoded string litera

    for text displayed in the status bar, and avoid hardcoding direct references to code points on code pages. Rather, use a message from Solomon’s message database or th

    caption of a hidden label.

    The maximum allowable length for a status message is 48 characters. If the string

    value to be displayed is greater than this length, it is automatically truncated beforedisplay, with no errors or warnings. Each new status message completely replaces th

    existing message displayed in the status bar.

    Specifying an empty string for the tooltip displays the entire status bar text for thetooltip. Optionally, a replacement tooltip can be specified.

    Here is a sample view of how the status bar would appear if the developer sets the teof the text pane of the status bar to “The big brown bear jumped over the little white

    hare”:

     Figure 2: Sample Status Bar

  • 8/20/2019 Tools for Visual Basic

    35/438

      Special Application Requirements

    Providing Database Configuration and Import Definition Filewith Applications

    A configuration file is used by Database Maintenance (98.290.000) to drive thecreation and updating of databases. The configuration file (DBBUILD.INI) is a

    Windows .ini formatted file. The Windows and Visual Basic Profile APIs are usretrieve data from the configuration file to provide the characteristics of the data

    to be created.

    Overview of the Configuration File

    The configuration file contains a [Scenarios] section for describing the availabledatabase scenarios and individual [Scenario#] sections for specifying informatio

    about the database for each scenario.

    The configuration file contains two additional sections that create the database s

    for the system database and application database(s): [MSSQL System Scripts] an[MSSQL Applications Scripts]. These sections contain keys that indicate file nascripts that create the database schema. Every database created from the scenario

    the [Scenarios] section uses the SQL statements and the data contained in the fil

    The [Update Scenarios] and the [Update ScenarioX] sections enable the develop perform schema updates and imports of data.

    [Scenarios] Section

    The [Scenarios] section lists all possible scenarios that can be selected from Dat Maintenance (98.290.000). Several scenarios may exist in this section to describ

    available database scenarios. Each item must be of the formatScenario#=”Descriptive Text”

    where # is a number and “Descriptive Text” is a short description of what the sc

    is. The maximum length of the “Descriptive Text” is 128 characters.

    The maximum number of scenarios that can be listed within this section is limite by the 64K data limit of the Windows ListBox control, which gets populated wi

    items from this [Scenarios] section.

    The Scenario# items must start with Scenario1 and increment by 1 for each scenFor example the following is a valid [Scenarios] section

    [Scenarios]

    Scenario1 = “Empty Company Databases”Scenario2 = “Demo Premier Databases”

    Scenario3 = “Demo Select Databases”

  • 8/20/2019 Tools for Visual Basic

    36/438

    24 Tools for Visual Basic®

    The example below is invalid:

    [Scenarios]

    Scenario3 = “Empty Company Databases”

    Scenario4 = “Demo Premier Databases”

    Scenario6 = “Demo Select Databases”The second example is invalid for two reasons. First, the scenario items must start wScenario1; therefore, Scenario3 is invalid. Second, the scenario items must have

    numeric values at the end of the key name that increment by 1 for each scenario, thuhaving Scenario6 after Scenario4 is invalid. Scenario5 is the only valid key name for

    the next scenario after Scenario4.

    [Scenario#] Sections

    Each scenario listed in the [Scenarios] section must have a corresponding section

    within the same configuration file. Each individual [Scenario#] section contains data

    specific to each system and application database to be created. Refer to the following

    example when reading the explanation of how this section works:

    [Scenarios]

    Scenario1 = “Empty Company Databases”

    Scenario2 = “Demo Premier Databases”

    [Scenario1]

    SysName = NewSystem

    SysSize = 10

    SysImport = empty database\system\import.lst

    AppNames = NewApp

    AppSizes=40

    AppImports=empty database\application\Import.lst

    [Scenario2]

    SysName = DemoPremierSystem

    SysSize = 10

    SysImport = demo database\premier\system\import.lst

    AppNames = DemoPremierApp10;DemoPremierApp60

    AppSizes=40;50

    AppImports=demo database\premier\appdb10\import.lst;demo

    database\premier\appdb60\import.lst

    Six key names that may be specified within each Scenario# section. Three of the key

    contain information about the system database, and three of them contain informatioabout the application database. These keys specify default values and may be

    overridden by using Advanced on the Create Databases tab of Database Maintenanc(98.290.00).

  • 8/20/2019 Tools for Visual Basic

    37/438

      Special Application Requirements

    SysName

    The SysName key indicates the default database name of the system database. Tname must conform to MS SQL Server 7.0 Database Naming Conventions.

    If a database with this name already exists on the destination SQL Server, and n