Code Structure / Component Question

I'm new to Flex and trying to learn as much as I can on my own without help, but I've run into a question that I'm not finding an answer for.
I've read about creating MXML components and understand that, as well as creating AS classes, that that makes sense too.
I have code in the default package which displays the Datagrid component (MXML) but also has ActionScript code in the same source file to load the datagrid via PHP (HTTPService) as well as define what happens when cells are updated (sending data back to update the DB via PHP).
This is all pretty much a self-contained "component" for manipulating data from a particular MySLQ table from this single datagrid.  I have the grid displayed on one tab of the tab navigator.
My problem is that I'd like to create a similar datagrid on a separate tab which does the same thing for a different table.   I know this code needs to be separated and not in one MXML file, but I'm not finding how to either structure my project to do this, or else make each datagrid (along with the associated AS code) into a separate component.
Would appreciate any help or examples you may have.
Thanks,
Gary

Thanks for pointing me in this direction -- I had started that way, but got confused.  Here are the first few lines of my current code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                                        width="998" height="656" creationComplete="init()" layout="absolute">
          <mx:Script>
                    <![CDATA[
                              import mx.controls.Alert;
                              import mx.events.PropertyChangeEvent;
                              import mx.events.CollectionEventKind;
                              import mx.events.CollectionEvent;
                              import mx.events.DataGridEvent;
                              import mx.controls.TextInput;
                              import mx.rpc.events.ResultEvent;
                              import mx.collections.ArrayCollection;
                              import com.adobe.serialization.json.JSON;
                              import com.adobe.viewsource.ViewSource;
                              [Bindable]
                              private var callbackUrl:String;
Naturally, my datagrid tag is dozens of lines below this:
<mx:TabNavigator x="23" y="10" width="831" height="506">
<mx:Canvas width="100%" height="100%" label="Learners">
<mx:DataGrid id="dgData"
x="27"
y="19"
width="778"
Can you show me a quick example of how I'd put this together with the top tag as you described?
Thanks again,
Gary

Similar Messages

  • Compile class file, check for code structure quality

    now i am trying to develop a system for my college final year project..the main function is to help the lecturer to mark the student java assignment
    any way to compile the java file..just to check for the error? if got error then 0 mark..no error got mark..and then check for the code structure and so...base on that ..to decide the student mark..like if good structure 20 mark..bad? 5 mark and so.
    is it possible to do so?
    Junit?
    any sample?

    Checking for errors is easy, just write a script to check if javac completed successfully. You can use similar approaches (possibly needing to parse the output) for jlint/PMD/whatever to check code structure. If there's any custom checks you want to do, though, I suggest you grab a parser (possibly witgh semantic analysis; I've found the Eclipse one is rather easily extracted and is good for this stuff) and write manual checks. It might be easier to write PMD rules, but you won't have the flexibility.

  • GL code Structure

    Dear gurus
    We are going for upgradation from 4.7E to ECC 6.0, in this we would like to convert GL Code structure(6 digit) to 8 digit Structure.
    Is it possible in ECC 6.0, if so, what r the consequence generally face.
    Can we create new GL Structure and can be transferred from 6 digit structure to 8 digit GL Code strucutre
    regards

    Hi,
    I give below my views :
    The chart of Account will hold upto 10 digits.
    You have to change the interval in OBD4 if you have given only 6 digit for accounts groups.
    The transaction data with old GL account numbers cannot be changed.
    The financial statement version derived so will have two accounts with same description.
    All the automatic account assignment has to be changed with new numbers.
    All the primary cost element numbers and the relative assignments in CO area has to be changed.
    The cut off date can be fixed as 31.03.2010 to enable you to take the balance sheet with old gl
    account numbers and thereafter upload the balances in new version is preferred.
    Regards,
    Sadashivan

  • Determining Code Structure

    Does anybody know if there is a way to determine the code structure (variables, statements, loops) of a pl/sql program unit (package, function, procedure, etc)?
    There are some code editors (e.g. PL/SQL developer) that makes avaliable a code structure window and a conventional code editor window. These windows are usually connected, so when you cilck on an item of the code structure window, the matching lines on the code editor window are highlighted.
    How does those kind of code editors determine the structure of a program unit? Do they have a client-side parser to read and analyze source code. Is there any Oracle API to get this information?
    Edited by: user630459 on 12/05/2009 05:10
    Edited by: user630459 on 12/05/2009 05:13
    Edited by: user630459 on 12/05/2009 06:05
    Edited by: user630459 on 12/05/2009 06:06

    Thanks, but unfortunetaly we use Oracle 10g Release 2. Since there aren't other options, I think I'll have to parse source code. I'm going to use an automatic paser generator (e.g. ANTRL framework) to save me from language processing stuff. Do you kown where I could find the PL/SQL Grammar?
    Edited by: user630459 on 12/05/2009 10:35
    Edited by: user630459 on 12/05/2009 10:36
    Edited by: user630459 on 12/05/2009 12:56
    Edited by: fadc80 on 13/05/2009 04:38
    Edited by: fadc80 on 13/05/2009 04:56

  • Best practice for code structure to control multiple devices in a 2 stage-sequ​ence

    I have a question about code architecture and getting multiple devices controlled and sychronized for one experiment. This is an "architecture"-type inquiry, so I am hoping for some suggestions on how to proceed.
    I run an experiment in which I control 2 NI PCI-6733. I am soon to add a Tektronix AFG 3022B, and have long been putting off an opportunity to rewrite my labview code from the ground up. I inherited it from an earlier research, and while functional, I would like to make it easier to modify and break up into subVi's and such. Link to the current program (labview 8.6.1) is here if you would like to see the code that is currently used, and the subvi's are in a zip file. The current version of the experiment consists of just one stage, all the writing of the data to the PCI cards is saved for the end. I need to change this in my new setup though. 
    The new experiment consists of 2 stages. The first will run (looping an output array to the PCI cards) until it hears a "true" from another computer (connected via TCP). At that point, it should switch to stage 2 and run a sequence (usually 10^5 timeunits in length, where the time unit is 0.1 ms) that outputs to the two PCI cards, the AFG 3022B, and with the flexibility to add more devices in the future.
    Most appreciated would be structural advice. How to arrange the VIs, if it's good to use a "master" VI that would control the two subVi's of stage 1 and 2, etc...  Feel free to ask for more details if it would help clarify my question. Thanks!
    Solved!
    Go to Solution.

    Programs of this type usually use a state machine of some sort.  You can find many tutorials on LabVIEW state machines in these forums or the LAVA forums.  If you are doing a rewrite, I would also recommend you consider LabVIEW classes.  They help modularize your code and make the subparts more reuseable.  You may end up with less to maintain, as a result.
    <shamelessPlug>You may also want to consider TestStand.  It was designed to run sequences of tests, so may make your life easier.  It could also be gross overkill.</shamelessPlug>
    Let us know if you run into issues with state machines or classes.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Dynamically add component question?

    Hi:
    Here is part of my code in short:
    public class TextInputWithAutoComplete extends TextInput
    private function addComp():void{
    list = new List();
    list.id = "autoCompleteList";
    list.x = 0;
    list.y = 20;
    list.addEventListener(MouseEvent.MOUSE_UP, handleMouseDown);
    parentDocument.addChild(autoCompleteList); OR addChild(autoCompleteList); //my question is here
    private function handleMouseDown():void{
    //TODO
    I realized that if I do addChild, I can't really see the dynamically added component, since flex did not reserve space for my List to display. So I do parentDocument.addChild, and then the component appears no problem. My question is since it's being added in the parentDocument, so it is suppose to be a component belong to parentDocument, so is that component still be able to call this handleMouseDown?
    From my experience, it's still able to, but which doesn't make sense to me.
    Can someone explain a little about why it can still work, or any better approach other than parentDocument.addChild
    Thanks.

    In Flex there is a lifecycle that represents the contract between the component and its parent.  See the chapters on creating custom components and the lifecycle methods createChildren, commitProperties, measure and updateDisplayList.
    Some components size to content like Containers.  When you add a child to a container it will measure the child and make room for it or add scrollbars if there isn't enough room.
    If you add a child to TextInput, it doesn't expect additional children so it will not make room for it.  You can subclass and override its measure and updateDisplayList methods to make room for an additional child.
    I would not recommend adding another interactive control to an interactive control since that will make managing focus and accessibility much harder.  It is better to group these in a container in most cases.
    The reason the mouse handler still gets called is because a handler can be on any object whether it is a child or sibling or parent and will be called by the object dispatching the event if the handler is listening to that object.  If you had attached the handler to "this" it would not get called when the List is not a child of "this".
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Is my code structure correct.

    This is a question about OOPs structure for an AIR
    application using flex 3 and actionscript3 without flex builder
    (IDE is eclipse with AXDT and ant). I am new to forums so redirect
    me if appropriate:
    The data maintenance will occur on an infrequent basis. Is
    this a good structure to using mxml and AS3?
    Note: I know that I can create the data maintenance Panel and
    other necessary controls in main.mxml, however I find that a large
    mxml file is hard for me to work with.
    Thanks in advance for your help and comments.
    Dick

    no this isn't a good structure. Keeping everything in one
    mxml is asking the code maintainer to be "punished".
    Do this:
    1. separate your states into "views", by creating custom
    components to represent each states.
    2. set up a blank "home view" state. All other states you
    have can then use it as reference.
    3. to manage states create a "model" (singleton) to handle
    the transition from state to state
    4. create as3 files specific to each "view" and reference
    them in their respective mxml files.
    take a look at this link:
    http://beingwicked.com/2008/07/flex-initialize-and-the-hassles-of-changing-state/

  • Code Structure Problem

    My description really isn't that great, i found it quite difficult to explain so please ask if you have any more questions.
    I have an Abstract class Called Animal, and two subclasses of this (which obviously extend Animal). The animal class implements an actor interface class called Actor in which there are 2 methods defined, one called act and the other called isAlive() .
    My programme does a simulation of wild life, one of the animals kills the other (only 2 at the moment) and this was already implemented by the teacher, our job now is to do a few tasks which i have previously done and now the second to last task is to create a hunter.
    The principle is that this new Hunter must define a new actor, ie an implementation of Actor(which means my new class Hunter has to implement the Actor class?)and must be a non animal, i chose a human, though it could have been the weather or some other scenario.
    I based the new class on that of the hunter of the two animals.This is fine and it works, however i have some serious code duplication between the Hunter class and one of the animal classes of which i can see no solution too, this worries me as code duplication isn't good and i was hoping maybe someone could help me out with some tips for potential changes to the structure.
    Regards

    and must be a non animal, i chose a human, So are you claiming to be a mineral, or a maybe vegetable? Of course humans are Animals! This simple fact of reality invalidates your current model, leading to code duplication.
    I suggest that you chose another scenario... Fire is-a Killer... I suppose one could define Fire in terms of an Actor having methods: act and isAlive ... fires burn and kill, and then they go out.
    Edit:
    Poignant at [the moment|http://images.google.com/images?q=victorian+bushfires].
    could anyone point me to the java tutorials on delegation please?Ummm... I'm unaware of any... but the general idea is certainly explained by many online resources... google for "delegate pattern"... and yes (IMHO) that's a preferable solution your code duplication woes than defining some dodgy abstract super class... because type inheritance (interfaces) is more flexible than implementation inheritance (classes).
    Cheers. Keith.
    Edited by: corlettk on 1/03/2009 22:33 ~~ Typos, and stuff.

  • Cannot create xmlindex with structured component

    Hello everybody,
    I want to create an XMLIndex with structured components on a table named BID_XWH. The table stores rows that are valid against the following XML Schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
         <xs:element name="bid">
              <xs:complexType>
                   <xs:all>
                        <xs:element name="bid_date" type="xs:date"/>
                        <xs:element name="bid_time" type="xs:time"/>
                        <xs:element name="increase" type="xs:float"/>
                   </xs:all>
                   <xs:attribute name="bid_id" type="xs:string" use="required"/>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    I want to index bid_id, bid_time and increase. I wrote the following code
    CREATE INDEX bid_idx ON bid_xwh(OBJECT_VALUE)
    INDEXTYPE IS XDB.XMLINDEX PARAMETERS(
    'XMLTABLE bid_tab ''/bid''
    COLUMNS
    bid_id varchar2(15) PATH ''@bid_id'',
    bid_time VARCHAR2(15) path ''bid_time'',
    increase integer path ''increase''
    However, I'm getting this error:
    {Erreur commençant à la ligne 1 de la commande :
    CREATE INDEX bid_idx ON bid_xwh(OBJECT_VALUE)
    INDEXTYPE IS XDB.XMLINDEX PARAMETERS(
                   'XMLTABLE bid_tab ''/bid''
                   COLUMNS
                  bid_id varchar2(15) PATH ''@bid_id'',
                  bid_time VARCHAR2(15) path ''bid_time'',
                  increase integer path ''increase''
    Erreur à la ligne de commande : 1, colonne : 0
    Rapport d'erreur :
    Erreur SQL : ORA-00600: code d'erreur interne, arguments : [ktcxbr0_1], [0x3B26BD24], [1], [0], [], [], [], [], [], [], [], []
    ORA-00600: code d'erreur interne, arguments : [kqludp2], [0x37C28CFC], [0], [], [], [], [], [], [], [], [], []
    00600. 00000 - "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]"
    *Cause:    This is the generic internal error number for Oracle program
    exceptions.     This indicates that a process has encountered an
    exceptional condition.
    *Action:   Report as a bug - the first argument is the internal error number}
    I have already created 4 other indexes on other tables, with quite the same syntax and everything worked fine. But for this table BID_XWH and another one, I am getting the error all the time. I suspected a storage problem, so, I granted the "unlimited tablespace" privilege to the user and then I restarted the database. The problem persists.
    I noticed that although I'm getting the above error, the index BID_IDX is created, but not the associated relational table BID_TABLE.
    I am using Oracle 11g R on Windows 7.
    Could you help please?
    Doulkifli.

    Hi,
    Some additional questions...
    - Could you give the complete version number?
    - What type of storage are you using?
    - Did you register the XML schema in the DB?
    Please post the DDL for your XMLType table.
    The following works for me on 11.2.0.1 :
    SQL> begin
      2   dbms_xmlschema.registerSchema(
      3   schemaURL => 'bid.xsd',
      4   schemaDoc => '<?xml version="1.0" encoding="UTF-8"?>
      5  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      6  <xs:element name="bid">
      7  <xs:complexType>
      8  <xs:all>
      9  <xs:element name="bid_date" type="xs:date"/>
    10  <xs:element name="bid_time" type="xs:time"/>
    11  <xs:element name="increase" type="xs:float"/>
    12  </xs:all>
    13  <xs:attribute name="bid_id" type="xs:string" use="required"/>
    14  </xs:complexType>
    15  </xs:element>
    16  </xs:schema>',
    17   local => true,
    18   genTypes => false,
    19   genTables => false,
    20   options => dbms_xmlschema.REGISTER_BINARYXML
    21   );
    22  end;
    23  /
    Procédure PL/SQL terminée avec succès.
    SQL> create table bid_xwh of xmltype
      2  xmltype store as binary xml
      3  xmlschema "bid.xsd"
      4  element "bid"
      5  ;
    Table créée.
    SQL> insert into bid_xwh values(
      2  xmltype(
      3  '<bid bid_id="ID001">
      4   <bid_date>2011-02-05</bid_date>
      5   <bid_time>12:34:56</bid_time>
      6   <increase>123.45</increase>
      7  </bid>')
      8  );
    1 ligne créée.
    SQL> commit;
    Validation effectuée.
    SQL> CREATE INDEX bid_idx ON bid_xwh(OBJECT_VALUE)
      2  INDEXTYPE IS XDB.XMLINDEX PARAMETERS(
      3  'XMLTABLE bid_tab ''/bid''
      4  COLUMNS
      5  bid_id varchar2(15) PATH ''@bid_id'',
      6  bid_time VARCHAR2(15) path ''bid_time'',
      7  increase integer path ''increase''
      8  ');
    Index créé.
    SQL> select /*+ gather_plan_statistics */
      2         x.*
      3  from bid_xwh t,
      4       XMLTable('/bid'
      5         passing t.object_value
      6         columns
      7           bid_id varchar2(15) PATH '@bid_id',
      8           bid_time VARCHAR2(15) path 'bid_time',
      9           increase integer path 'increase'
    10       ) x
    11  ;
    BID_ID          BID_TIME          INCREASE
    ID001           12:34:56.000000        123
    SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID  g6t7430a6g7dp, child number 0
    select /*+ gather_plan_statistics */        x.* from bid_xwh t,
    XMLTable('/bid'        passing t.object_value        columns
    bid_id varchar2(15) PATH '@bid_id',          bid_time VARCHAR2(15) path
    'bid_time',          increase integer path 'increase'      ) x
    Plan hash value: 752159937
    | Id  | Operation                    | Name                   | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    |   0 | SELECT STATEMENT             |                        |      1 |        |      1 |00:00:00.01 |       6 |
    |   1 |  NESTED LOOPS                |                        |      1 |        |      1 |00:00:00.01 |       6 |
    |   2 |   NESTED LOOPS               |                        |      1 |      1 |      1 |00:00:00.01 |       5 |
    |   3 |    INDEX FAST FULL SCAN      | SYS_C0011792           |      1 |      1 |      1 |00:00:00.01 |       4 |
    |*  4 |    INDEX RANGE SCAN          | SYS76494_76495_OID_IDX |      1 |      1 |      1 |00:00:00.01 |       1 |
    |   5 |   TABLE ACCESS BY INDEX ROWID| BID_TAB                |      1 |      1 |      1 |00:00:00.01 |       1 |
    Predicate Information (identified by operation id):
       4 - access("T"."SYS_NC_OID$"="SYS_ALIAS_0"."OID")
    Note
       - dynamic sampling used for this statement (level=2)
    29 ligne(s) sélectionnée(s).

  • Need sample code for component programming

    I see samples page here:
    /docs/DOC-8061#61
    want to download "Web Dynpro Component Interface Definitions in Practice" sample, but only empty folders structure provided in download link.
    ("zip file" link )
    How to get full sample project according whay is written on this page?
    May be someone have this or like this sample ?
    (with some description than)
    I need to develop such type of application
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f07c3625-c971-2910-3a9c-ce131487f82c
    components, component interface usage, also for GP, but do not see code samples for this.
    Can you help with it?
    thanks
    Edited by: Vladimir Grigoryev on Aug 7, 2008 10:01 AM

    Hallo Vladimir,
    sorry me, but I have absolutely no idea what your problem really is. I provided you with all required information to download, import, build, deploy and run my Web Dynpro Java Sample application on "Component Interface Definitions in Practice". This material is enriched with in-depth technical documentation on the underlying concepts (you already linked to all these resources in the initial message of this thread; your second link is pointing to my powerpoint presentation on this sampel) to answer your last message about "but code is not sufficient".
    PLEASE read the [Readme.txt|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0e4528f-c471-2910-66a0-dd459f975dc2] file to successfully install the local Web Dynpro DCs comprising the sample application metadata.
    NOTE: This sample is based on SAP NetWeaver 7.0, NOT on NetWeaver CE 7.1!!!
    I do not want to repeat all my descriptions in this mail thread.
    Regards, Bertram

  • Source Code Structure

    I know there are a ton of different ways to structure your code. Been searching around the this forum and other google farming results and so far this is what I have come up with. If you have a better solution or dislike the way I do something I would love to hear about it. We have a new project and wanted to get started off on the right foot so we are pretty open to most things.
    /apps
      /myapp
        /lib
          (where are my jars go ofcourse)
        /src
          /com/mycompany/myapp
            /domain
              (all the objects that represent my domain)
            /repository
              (all my DAOs)
            /service
              (all the stuff that manipulates my domain options)
            /web     
              (all my controllers...perhaps other web specific things too)
        /test
          (all my tests that directly correspond to the above package structure...ie if I want to test a domain object it would be located at /test/com/mycompany/myapp/domain/MyObjectTest.java)
        /web
          (static file such as images, scripts and such)As you can see it is for a web application but similar principles could apply for other applications as well (minus the web stuff).

    You're mixing two concerns here:
    1.) How to structure your project directory with source/tests/libraries and
    2.) How to structure your packages.
    I'll ignore concern number 2 for now, as it's a pretty separate question.
    Personally, I've come to like the way Maven wants its projects to be set up by default. That setup makes sense, even if you don't use Maven:
    /myProject
      /src
        /main
          /java
            (this directory contains all production Java code)
          /resources
            (this directory contains all non-Java code resources that are needed for production)
          /web
            (this optional directory contains web-related resources, JSPs, WEB-INF, ...)
        /test
          /java
            (this directory contains all test Java code, JUnit tests, ...)
          /resources
              (this directory contains all non-Java code resources that are needed for the tests)
      /target
        (this directory is not checked into version control and is where all artifacts are built into. It's the only directory that gets modified during a build, leaving all other areas to be modified by the developer only)Note that there is no /lib directory, since Maven makes it unnecessary for the libraries to be contained in the project directory.If you don't use Maven, then I suppose you could just add a /lib directory at the top level.

  • Sample JAVA Mobile Server Publish code, and technical questions

    Dear Oracle technical representative, or user:
    I need to programmatically create, and remove publications using the pure JAVA classes of Consolidator, ConsolidatorManager, and ResourceManager for the Mobile Server in OracleLite 9i Release 5.0.1. On the creation side I have managed to get the example found in the directory OraLite501\Mobile\Server\Sample\Sample11 functioning using my installation parameters. I had a very difficult time of it because (1) the sample11 code fails to open an jdbc connection to the Mobile Server Repository Schema with the function Consolidator.OpenConnection, and (2) the ResourceManager function openConnection will not work unless the Webtogo.ora file is in the current working directory. The ConsolidatorManager function OpenConnection may also not work unless the Webtogo.ora file is in the current working directory, but I did test the hypothesis. Both of these problems need to be addressed in the sample11 code, and documentation to save other software developers from wasting hours of their valuable time. See line 223, 386, and 448 in the Publish.Java code that follows this problem description.
    With the above two problems resolved, I can now programmatically create publications, but no hints on how to programmatically remove a publication exist in the documentation. The application I am developing will require the dynamic creation, and removal of publications. Also, when developing applications the complete removal of a publication is absolutely necessary when you have botched a publication. Thus my first question is What sequence of ResourceManager, and ConsolidatorManager function calls will completely remove a Publication?.
    I also have two issues remaining with the code that I have so far developed. These issues will most likely be resolved, when I obtain instructions on how to completely remove a publication, and associated users. But, perhaps not. Referencing the Publish.java file that follows this problem description,
         1. The ResourceManager function dropUser does not drop a user. See my comments, and code beginning at line 277 in Publish.java. Do I need to de-instantiate all subscriptions, and unsubscribe all subscription users before calling this function.? I think, I tried the de-instantiate, unsubscribe sequence without success, but in the confusion I may not have made the try.
         2. How do I get rid of an index created with the ConsolidatorManager function DropPublicationItemIndex?. My comments on this problem begin at line 522 in Publish.java. For some reason the DropPublicationItemIndex function call made below line 448 does not work. What function calls are required prior to calling the DropPublicationItemIndex function?
    Throughout the Publish.java code, I have made comments about some of the problems that I have had in getting the sample11 code working for my installation parameters. I think these comments should help the programmers maintaining the ResourceManager, and ConsolidatorManager code improve the stability of the programs. Please pass these comments, and attached files to the appropriate individuals,
    if you are in a position to do so.
    The other files that follow the Publish.java code are
         1. Compile.bat - Compiles Publish.java using j2sdk1.4.0.
         2. Run.bat - Executes Publish using \ j2sdk1.4.0\jre\server\jvm.dll.
         3. Webtogo.ora
         4. tnsnames.ora for the Mobile Server.
         5. tnsnames.ora for the Database.
    Feel free to access my server if you need to do so in resolving my problems. The parameters you will need to gain access can be found at the top of Publish.java, and in the included *.ora files.
    Thanks,
    Thomas G. Matney
    [email protected]
    (662)325-2791
    //Start of Publish.java code
    // Oracle HTTP Server URL = http://yggdrasill.cfr.msstate.edu:7778
    // = http://130.18.168.225:7778
    // Mobile Server URL = http://yggdrasill.cfr.msstate.edu/webtogo/startup
    // = http://130.18.168.225/webtogo/startup
    // Mobile Server Control Center URL = http://yggdrasill.cfr.msstate.edu/webtogo
    // = http://130.18.168.225/webtogo
    // Mobile Server Control Center URL = http://yggdrasill.cfr.msstate.edu/webtogo
    // = http://130.18.168.225/webtogo
    // Mobile Server Control Center username = administrator
    // Mobile Server Control Center password = admin
    // Mobile Server URL = http://yggdrasill.cfr.msstate.edu/webtogo/startup
    // = http://130.18.168.225/webtogo/startup
    // Mobile administrator username = fiafield // Schema FIAFIELD on FIA.CFR.MSSTATE.EDU
    // Mobile administrator password = fiafield // Username and password are the same
    import java.sql.SQLException;
    import java.sql.*;
    import oracle.lite.sync.Consolidator;
    import oracle.lite.sync.ConsolidatorManager;
    import oracle.mobile.admin.ResourceManager;
    import oracle.mobile.admin.ResException;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import oracle.mobile.admin.*;
    public class Publish
    // Schema names and usernames are not case sensitive.
    // UN fiafield = FIAFIELD
    // SCHEMA fiafield = FIAFIELD
    // Schema name/Username, and password used on creation of Mobile Repository
    static String CONS_SCHEMA = "fiafield";
    static String DEFAULT_PASSWORD = "fiafield";
    static String admin_jdbc_url = "jdbc:oracle:oci8:@WEBTOGO.WORLD";
    static String thin_jdbc_url =
    "jdbc:oracle:thin:@YGGDRASILL:1521:FIA.YGGDRASILL.CFR.MSSTATE.EDU";
    static String Publication;
    static String CreateTreeTableShortNames =
    "CREATE TABLE FIAFIELD.ZMTR1TBL("
    + "id FLOAT,"
    + "subp FLOAT,"
    + "rnum FLOAT,"
    + "st FLOAT,"
    + "unit FLOAT,"
    + "cnty FLOAT,"
    + "plot FLOAT,"
    + "cyc FLOAT,"
    + "scyc FLOAT,"
    + "tree FLOAT,"
    + "ncpt FLOAT NULL,"
    + "dist FLOAT NULL,"
    + "diam FLOAT NULL,"
    + "dmht FLOAT NULL,"
    + "dmck FLOAT NULL,"
    + "spec FLOAT NULL,"
    + "lang FLOAT NULL,"
    + "nctc FLOAT NULL,"
    + "stat FLOAT NULL,"
    + "util FLOAT NULL,"
    + "deca FLOAT NULL,"
    + "crat FLOAT NULL,"
    + "ccls FLOAT NULL,"
    + "az FLOAT NULL,"
    + "cond FLOAT NULL,"
    + "tlen FLOAT NULL,"
    + "alen FLOAT NULL,"
    + "lmet FLOAT NULL,"
    + "nctg FLOAT NULL,"
    + "rcul FLOAT NULL,"
    + "ncpd FLOAT NULL,"
    + "dead FLOAT NULL,"
    + "mor FLOAT NULL,"
    + "modm FLOAT NULL,"
    + "dml1 FLOAT NULL,"
    + "dmt1 FLOAT NULL,"
    + "dms1 FLOAT NULL,"
    + "dma1 FLOAT NULL,"
    + "dml2 FLOAT NULL,"
    + "dmt2 FLOAT NULL,"
    + "dms2 FLOAT NULL,"
    + "dma2 FLOAT NULL,"
    + "dml3 FLOAT NULL,"
    + "dmt3 FLOAT NULL,"
    + "dms3 FLOAT NULL,"
    + "dma3 FLOAT NULL,"
    + "dbtr FLOAT NULL,"
    + "dbsp FLOAT NULL,"
    + "nxtn FLOAT NULL,"
    + "dbds FLOAT NULL,"
    + "dbaz FLOAT NULL,"
    + "psta FLOAT NULL,"
    + "fiat FLOAT NULL,"
    + "fhmt FLOAT NULL"
    + ")";
    static String CreateTreeTableLongNames =
    "CREATE TABLE FIAFIELD.ZMTR1TBL("
    + "ID FLOAT,"
    + "SUBPLOT FLOAT,"
    + "RECORD_NUMBER FLOAT,"
    + "STATE FLOAT,"
    + "UNIT FLOAT,"
    + "COUNTY FLOAT,"
    + "PLOT FLOAT,"
    + "CYCLE FLOAT,"
    + "SUBCYCLE FLOAT,"
    + "TREE FLOAT,"
    + "NC_PLOT_TYPE FLOAT,"
    + "DISTANCE FLOAT NULL,"
    + "DIAMETER FLOAT NULL,"
    + "DIAMETER_HEIGHT FLOAT NULL,"
    + "DIAMETER_CHECK FLOAT NULL,"
    + "SPECIES FLOAT NULL,"
    + "LEAN_ANGLE FLOAT NULL,"
    + "NC_TREE_CLASS FLOAT NULL,"
    + "STATUS FLOAT NULL,"
    + "UTILIZATION FLOAT NULL,"
    + "DECAY FLOAT NULL,"
    + "CROWN_RATIO FLOAT NULL,"
    + "CROWN_CLASS FLOAT NULL,"
    + "AZIMUTH FLOAT NULL,"
    + "CONDITION FLOAT NULL,"
    + "TOTAL_LENGTH FLOAT NULL,"
    + "ACTUAL_LENGTH FLOAT NULL,"
    + "LENGTH_METHOD FLOAT NULL,"
    + "NC_TREE_GRADE FLOAT NULL,"
    + "ROTTEN_CULL FLOAT NULL,"
    + "NC_PREVIOUS_DBH FLOAT NULL,"
    + "CAUSE_OF_DEATH FLOAT NULL,"
    + "MORTALITY_YEAR FLOAT NULL,"
    + "MO_DAMAGE FLOAT NULL,"
    + "DAMAGE_LOCATION1 FLOAT NULL,"
    + "DAMAGE_TYPE1 FLOAT NULL,"
    + "DAMAGE_SEVERITY1 FLOAT NULL,"
    + "NC_DAMAGE_AGENT1 FLOAT NULL,"
    + "DAMAGE_LOCATION2 FLOAT NULL,"
    + "DAMAGE_TYPE2 FLOAT NULL,"
    + "DAMAGE_SEVERITY2 FLOAT NULL,"
    + "NC_DAMAGE_AGENT2 FLOAT NULL,"
    + "DAMAGE_LOCATION3 FLOAT NULL,"
    + "DAMAGE_TYPE3 FLOAT NULL,"
    + "DAMAGE_SEVERITY3 FLOAT NULL,"
    + "NC_DAMAGE_AGENT3 FLOAT NULL,"
    + "DB_TREE FLOAT NULL,"
    + "DB_SPECIES FLOAT NULL,"
    + "NEXT_NUMBER FLOAT NULL,"
    + "DB_DISTANCE FLOAT NULL,"
    + "DB_AZIMUTH FLOAT NULL,"
    + "PREVIOUS_STATUS FLOAT NULL,"
    + "FIA_TREE_NUMBER FLOAT NULL,"
    + "FHM_TREE FLOAT NULL"
    + ")";
    public static void main(String argv[]) throws Throwable
    // Publish - an OKAPI sample
    if(argv.length == 2)
    CONS_SCHEMA = argv[0] ;
    DEFAULT_PASSWORD = argv[1] ;
    //create required tables using standard jdbc
    //DriverManager.registerDriver ((Driver)Class.forName ("oracle.jdbc.driver.OracleDriver").newInstance ());
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    Connection c = null;
    Statement s = null;
    try
    // Open connection to Mobile Repositoty/FIAFIELD schema as SYSTEM.
    // Need the ability to grant resources, and connection to Mobile Repository user
    //c = DriverManager.getConnection ("jdbc:oracle:oci8:@WEBTOGO.WORLD", "SYSTEM", "phwphw" );
    // Remote connection. See attached webtogo.ora.
    c = DriverManager.getConnection ("jdbc:oracle:oci8:@WEBTOGO.WORLD.YGG",
    "SYSTEM", "phwphw");
    s = c.createStatement ();
    try
    s.executeUpdate("DROP table FIAFIELD.ZMTR1TBL");
    catch (SQLException ee)
    ee.printStackTrace ();
    try
    s.executeUpdate(CreateTreeTableShortNames);
    catch (SQLException ee)
    ee.printStackTrace ();
    try
    s.executeUpdate("alter table FIAFIELD.ZMTR1TBL add constraint"
    +" zmtr1tbl_pk primary key(subp, tree)");
    catch (SQLException ee)
    ee.printStackTrace ();
    // Line 223 // create consolidator publications.
    try
    // *****!!!!! Unless the Webtogo.ora file is in the current working
    // directory the connection is not made. This version of the resource
    // manager must be looking for the file in the old 8i Mobile default
    // directory. This is a definite problem. If the code was working, the
    // addition of the webtogo.ora should have affect on the functionality
    // of the code.
    // The connection is made to the Mobile Server. At least no exceptions
    // are thrown, provided the webtogo.ora is in the current working
    // directory.
    //oracle.mobile.admin.ResourceManager.openConnection(CONS_SCHEMA, DEFAULT_PASSWORD);
    // I tried making a direct connect to possibly avoid needing to have the
    // webtogo.ora file in the current directory. The direct coonect did not work.
    // You can quickly convince yourself that the webtogo.ora file must
    // be in the current working directory, by running the code with and
    // without the webtogo.ora in the current working directory.
    // The directory OraLiteHome\Mobile\Server\bin is in the PATH after
    // after installation but the extension .ora is not in PATHEXT. The
    // OraLite installer should put .ora in PATHEXT. I tried adding .ora
    // to the PATHEXT, but it still could not find thw webtogo.ora file,
    // and it should have. What is going on? I am a bit rusty on DOS so
    // I may not have thing right.
    // OraLiteHome\Mobile\Server\bin is the residing directory for
    // the functional copy of the webtogo.ora file.
    oracle.mobile.admin.ResourceManager.openConnection(
    CONS_SCHEMA,
    DEFAULT_PASSWORD,
    "jdbc:oracle:oci8:@WEBTOGO.WORLD");
    catch(ResException ee)
    ee.printStackTrace (); // NULL Pointer Exception?
    // The Mobile user is created, and then the function throws a resource exception.
    // This is a serious problem with the code. One would assume that the user
    // is not created if and exception is thrown.
    // This appears to be a bug in the createUser code. The function should return
    // false if the user is not created, and handle, or not throw the exception.
    // The function always returns false. It does return true when a user is created
    // because it throws an exception.
    boolean bIsCreated;
    System.out.println("Begin of why is ResourceManager not dropping users?");
    // Line 277
    try
    // The dropUser function will not drop a user. I have tested the function
    // by creating the user ZMPT1UA in the Mobile Server Control Center
    // http://Yggdrasill.cfr.msstate.edu/webtogo
    // so I know that the user exist.
    // This function throws a ResException but it is not declared correctly
    // since you cannot trap the exception as a ResException. It always tells
    // me the view does not exist. What steps are required to get the function
    // to work? What function calls need to be made prior to calling the dropUser
    // function.
    oracle.mobile.admin.ResourceManager.dropUser("ZMPT1UA");
    catch (Throwable ee)
    ee.printStackTrace (); // NULL Pointer Exception?
    System.out.println("End of why is ResourceManager not dropping users?");
    try
    bIsCreated = oracle.mobile.admin.ResourceManager.createUser(
    "ZMPT1UA",
    DEFAULT_PASSWORD,
    "ZMPT1UA", "S");
    catch (Throwable ee)
    ee.printStackTrace (); // Ignore exception
    // Obsolete or depreciated function, according to documentation?
    oracle.mobile.admin.ResourceManager.commitTransaction();
    // Create CONS_SCHEMA user on the database with the same username, and
    // password as the user on the Mobile Server side. This is why the
    // DriverManager connection was made as SYSTEM/phwphw.
    // Grant ALL to repository, and user on replicated database
    // On the database side there is a user with un = fiafield,
    // and pw = fiafield, which is the same as the Mobile Repository
    // schema name/password pair fiafield/fiafield. Can this duality
    // create a problem? Probably not.
    // Need SYSTEM ADMIN privilages for the next two steps, and that is
    // why the coonection was established as SYSTEM/phwphw.
    // Make user, and grants for Publish to user CONS_SCHEMA, and ZMPT1UA
    System.out.println("Pargress point D");
    try
    s.execute("Create user " + "ZMPT1UA" + " identified by " + DEFAULT_PASSWORD);
    catch (SQLException ee)
    ee.printStackTrace (); // ignore
    try
    s.execute("GRANT ALL ON FIAFIELD.ZMTR1TBL to " + CONS_SCHEMA + " WITH GRANT OPTION");
    catch (SQLException ee)
    ee.printStackTrace (); // ignore
    try
    s.execute("GRANT ALL ON FIAFIELD.ZMTR1TBL to " + "ZMPT1UA" + " WITH GRANT OPTION");
    catch (SQLException ee)
    ee.printStackTrace (); // ignore
    /* This code is not needed to test the code
    // Insert items into table FIAFIELD.ZMTR1TBL from FIAFIELD.HUSKY_TREE
    String Statement =
    "INSERT INTO FIAFIELD.ZMTR1TBL SELECT * from FIAFIELD.HUSKY_TREE WHERE PLOT = 1";
    try
    s.execute(Statement);
    catch (SQLException ee)
    System.out.println("FIAFIELD.HUSKY_TREE was not inserted into FIAFIELD.ZMTR1TBL");
    ee.printStackTrace (); // ignore
    c.commit ();
    catch (SQLException ee)
    ee.printStackTrace ();
    finally
    if (s!= null) try {s.close ();}catch (SQLException e1){}
    if (c!= null) try {c.close ();}catch (SQLException e2){}
    // The Consolidator class is not thread safe, and I will eventually
    // need thread safety. The ConsolidatorManage class is thread safe.
    //Consolidator ConsolidatorXX = new Consolidator();
    ConsolidatorManager ConsolidatorXX = new ConsolidatorManager();
    // Line 386
    // Try opening a connection. Sample11 does not open a connection, but it seems
    // like a logical first thing to do.
    // At least with this connection the DropPublication, and AddPublication functions
    // appear to work, or at least they do not throw exceptions. The DropPublication
    // throws an exception if a publication does not exist? I tested this and indeed
    // if I call the DropPublication function, and do not create the Publication again
    // when I reenter the program the DropPublication function throws an exception, and
    // produces the correct error message(The publication does not exist). There is hope.
    // It is very disturbing that the program fails unless the webtogo.ora file is not
    // in the current working directory. Because the OpenConnection functions of both
    // the ResourceManager, and ConsolidatorManager both appear to need access to the
    // webtogo.ora file, and they are finding them in the current directory, the
    // logical conclusion is that both of the classes are attempting to open the
    // webtogo.ora with the relative path webtogo.ora, and not the absolute path
    // OraHomeLite/Mobile/Server/Bin/webtogo.ora. As this has to be the case, why
    // is this very important fact not in the documentation? Or, am I wrong?
    Connection conn = null;
    try
    //ConsolidatorXX.OpenConnection(CONS_SCHEMA,
    //DEFAULT_PASSWORD);
    //ConsolidatorXX.OpenConnection(CONS_SCHEMA,
    //DEFAULT_PASSWORD,
    //"jdbc:oracle:oci8:@WEBTOGO.WORLD");
    conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@WEBTOGO.WORLD",
    CONS_SCHEMA,DEFAULT_PASSWORD);
    //conn = DriverManager.getConnection
    //("jdbc:oracle:oci8:@WEBTOGO.WORLD",
    //"SYSTEM","phwphw");
    ConsolidatorXX.OpenConnection(conn);
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    // Publication name
    Publication = "ZMTR1PUB";
    try
    ConsolidatorXX.DeinstantiateSubscription(Publication, "ZMPT1UA");
    catch (Throwable e)
    System.out.println("Could not Deinstantiate Subscription ZMPT1UA");
    e.printStackTrace(); //ignore error
    // Line 448
    // There is no Consolidator.OpenConnection in the orginal sample11.java code.
    // Why?. It appears to be neccessary. The only way I can make the sample11 code
    // or this program work is to open a jdbc connection with the Consolidator.OpenConnection
    // function. I assume that somehow the Consolidator.OpenConnection function was
    // deleted from sample11.java.
    // This try to drop a publication index does not work, because when I try
    // to recreate the index in the following code it warns me that I have a
    // bad column name for the index. So it thinks the index still exist.
    // Why?. How do I get rid of the index?
    try
    ConsolidatorXX.DropPublicationItemIndex("ZMTR1IX1");
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    ConsolidatorXX.DropPublicationItem("ZMTR1ITM");
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    ConsolidatorXX.DropPublication(Publication);
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    //ConsolidatorXX.CreatePublication(Publication, Consolidator.OKPI_CREATOR_ID,
    //"zMTR1.%s", null);
    ConsolidatorXX.CreatePublication(Publication, Consolidator.OKAPI_WINCE,
    "zMTR1.%s", null);
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    ConsolidatorXX.DropPublicationItemIndex("ZMTR1IX1");
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    ConsolidatorXX.CreatePublicationItem("ZMTR1ITM","FIAFIELD","ZMTR1TBL", "F",
    "SELECT * FROM FIAFIELD.ZMTR1TBL", null, null);
    catch (Throwable e)
    e.printStackTrace();
    System.out.println("Begin of how can drop this index and get rid of the warning?");
    // Line 522
    // I defined the index ZMTR1IX1 originally on the variable subp, and did not get
    // any warning. I then changed the index variable for the index to id, and started
    // receiving the warning to check the index column for typographical errors. Even
    // if I change the index variable back to subp, I continue to receive the warning.
    // How do I get rid of the index and the warning, so I can recreate the index for
    // another variable? I quess the real question is "How to I completely remove a
    // publication, and all of its parts so I can start over?
    try
    ConsolidatorXX.CreatePublicationItemIndex(
    "ZMTR1IX1", "ZMTR1ITM", "I", "id");
    catch (Throwable e)
    e.printStackTrace ();
    System.out.println("End of how can drop this index and get rid of the warning?");
    try
    ConsolidatorXX.AddPublicationItem(
    Publication, "ZMTR1ITM", null, null, "S", null, null);
    catch (Throwable e)
    e.printStackTrace ();
    try
    ConsolidatorXX.CreateSubscription(Publication, "ZMPT1UA");
    catch (Throwable e)
    e.printStackTrace ();
    try
    ConsolidatorXX.InstantiateSubscription(Publication, "ZMPT1UA");
    catch (Throwable e)
    e.printStackTrace ();
    try
    ConsolidatorXX.CloseConnection();
    if(conn != null)
    conn.close();
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    // Obsolete or depreciated function, according to documentation?
    oracle.mobile.admin.ResourceManager.commitTransaction();
    oracle.mobile.admin.ResourceManager.closeConnection();
    End of Publish.java code     
    Begin Compile.bat
    set CLASSPATH = .;D:\jdk1.4.0\lib\tools.jar;D:\OraLite501\MOBILE\classes\CONSOLIDATOR.JAR;D:\OraLite501\MOBILE\SERVER\BIN\WEBTOGO.JAR;D:\OraLite501\jdbc\lib\classes12.zip;D:\OraLite501\MOBILE\classes\classgen.jar;D:\OraLite501\MOBILE\classes\servlet.jar;D:\OraLite501\MOBILE\CLASSES\OLITE40.JAR
    set PATH= d:\jdk1.4.0\jre\bin\server;d:\jdk1.4.0\bin;D:\OraLite501\bin;D:\OraLite501\Mobile\Server\bin;D:\oracle\ora92\bin;D:\OraLite501\MOBILE\sdk\bin
    d:\jdk1.4.0\bin\javac Publish.java
    End Compile.bat          
    Begin Run.bat
    set CLASSPATH= .;D:\jdk1.4.0\lib\tools.jar;D:\OraLite501\MOBILE\classes\CONSOLIDATOR.JAR;D:\OraLite501\MOBILE\SERVER\BIN\WEBTOGO.JAR;D:\OraLite501\jdbc\lib\classes12.zip;D:\OraLite501\MOBILE\classes\classgen.jar;D:\OraLite501\MOBILE\classes\servlet.jar;D:\OraLite501\MOBILE\CLASSES\OLITE40.JAR
    set PATH= d:\jdk1.4.0\jre\bin\server;d:\jdk1.4.0\bin;D:\OraLite501\bin;D:\OraLite501\Mobile\Server\bin;D:\oracle\ora92\bin;D:\OraLite501\MOBILE\sdk\bin
    d:\jdk1.4.0\bin\java Publish
    End Run.bat
    Begin webtogo.ora
    USE_SYSTEM_CLASSPATH = NO
    MODE = SERVER
    PORT = 80
    BASE_URL=/webtogo
    ADMIN_TNS_NAME=WEBTOGO.WORLD
    ADMIN_JDBC_URL=jdbc:oracle:oci8:@WEBTOGO.WORLD
    APPLET_USE_THIN_JDBC = YES
    THIN_JDBC_URL=jdbc:oracle:thin:@YGGDRASILL:1521:FIA.YGGDRASILL.CFR.MSSTATE.EDU
    SITE_OFFLINE_PERIOD=0
    CUSTOM_WORKSPACE=no
    CUSTOM_DIRECTORY=myworkspace
    DEFAULT_PAGE=myfirstpage.html
    ADMIN_USER=8B37E78535B55525292A3A2929292999
    ADMIN_PASSWORD=873515A838B85828292A3A2929292999
    [EXTERNAL_AUTHENTICATION]
    #CLASS=com.acme.SampleAuthenticator
    # Web-to-go workspace's font
    FONT_NAME=Arial
    [FILESYSTEM]
    #ROOT_DIR=%WEBTOGO_HOME%\server
    #TYPE=O8
    #TYPE=OL
    #TYPE=OS
    # Cache size in MBs
    #CACHE_SIZE=10
    MAX_CONNECTIONS=4
    [DEBUG]
    #ENABLE=YES
    # The log file name.
    #LOG_FILE=test.log
    # Machine name and port where wsh.exe -m is running. Web-to-go
    # will send debug output to that machine.
    #MACHINE=
    #PORT=100
    [APPLICATIONS]
    XMLFILE = ws1.xml
    PACK_HELP=D:\OraLite501\mobile\doc\wtg\html\wtgdep.htm
    [PUBLIC]
    oracle.lite.sync.ConsolidatorServlet=/Consolidator
    [CONSOLIDATOR]
    # Installer will change these values
    SERVER_VERSION=8.1.5
    # 8.0.5 or 8.1.5
    # Installer won't change these values
    MAX_THREADS=3
    JDBC_DRIVER=oracle.jdbc.driver.OracleDriver
    CREATE_USER_OPTIONS_O8I=PROFILE CONSOLIDATOR_CLIENT_P DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS TEMPORARY TABLESPACE INDX QUOTA UNLIMITED ON INDX
    CREATE_USER_OPTIONS_O8=PROFILE CONSOLIDATOR_CLIENT_P DEFAULT TABLESPACE USR QUOTA UNLIMITED ON USR
    TEMPORARY TABLESPACE TEMPORARY QUOTA UNLIMITED ON TEMPORARY
    TEMP=c:\\temp
    WTG_PROXY_PORT=80
    TRACE=NO
    TRACE_ALL=NO
    End webtogo.ora
    Begin Mobile Server tnsnames.ora file
    # TNSNAMES.ORA Network Configuration File: D:\OraLite501\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    WEBTOGO.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = YGGDRASILL.CFR.MSSTATE.EDU)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    WEBTOGO.WORLD.YGG =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = YGGDRASILL.CFR.MSSTATE.EDU)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    End Mobile Server tnsnames.ora file
    Begin Database tnsnames.ora file
    # TNSNAMES.ORA Network Configuration File: D:\oracle\ora92\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    INST1_HTTP.CFR.MSSTATE.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = MODOSE)
    (PRESENTATION = http://HRService)
    FIA.CFR.MSSTATE.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    FIA.YGGDRASILL.CFR.MSSTATE.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill.cfr.msstate.edu)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    FIA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    FIA.YGG =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill.cfr.msstate.edu)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    EXTPROC_CONNECTION_DATA.CFR.MSSTATE.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    End Database tnsnames.ora file

    Dear Oracle technical representative, or user:
    I need to programmatically create, and remove publications using the pure JAVA classes of Consolidator, ConsolidatorManager, and ResourceManager for the Mobile Server in OracleLite 9i Release 5.0.1. On the creation side I have managed to get the example found in the directory OraLite501\Mobile\Server\Sample\Sample11 functioning using my installation parameters. I had a very difficult time of it because (1) the sample11 code fails to open an jdbc connection to the Mobile Server Repository Schema with the function Consolidator.OpenConnection, and (2) the ResourceManager function openConnection will not work unless the Webtogo.ora file is in the current working directory. The ConsolidatorManager function OpenConnection may also not work unless the Webtogo.ora file is in the current working directory, but I did test the hypothesis. Both of these problems need to be addressed in the sample11 code, and documentation to save other software developers from wasting hours of their valuable time. See line 223, 386, and 448 in the Publish.Java code that follows this problem description.
    With the above two problems resolved, I can now programmatically create publications, but no hints on how to programmatically remove a publication exist in the documentation. The application I am developing will require the dynamic creation, and removal of publications. Also, when developing applications the complete removal of a publication is absolutely necessary when you have botched a publication. Thus my first question is What sequence of ResourceManager, and ConsolidatorManager function calls will completely remove a Publication?.
    I also have two issues remaining with the code that I have so far developed. These issues will most likely be resolved, when I obtain instructions on how to completely remove a publication, and associated users. But, perhaps not. Referencing the Publish.java file that follows this problem description,
         1. The ResourceManager function dropUser does not drop a user. See my comments, and code beginning at line 277 in Publish.java. Do I need to de-instantiate all subscriptions, and unsubscribe all subscription users before calling this function.? I think, I tried the de-instantiate, unsubscribe sequence without success, but in the confusion I may not have made the try.
         2. How do I get rid of an index created with the ConsolidatorManager function DropPublicationItemIndex?. My comments on this problem begin at line 522 in Publish.java. For some reason the DropPublicationItemIndex function call made below line 448 does not work. What function calls are required prior to calling the DropPublicationItemIndex function?
    Throughout the Publish.java code, I have made comments about some of the problems that I have had in getting the sample11 code working for my installation parameters. I think these comments should help the programmers maintaining the ResourceManager, and ConsolidatorManager code improve the stability of the programs. Please pass these comments, and attached files to the appropriate individuals,
    if you are in a position to do so.
    The other files that follow the Publish.java code are
         1. Compile.bat - Compiles Publish.java using j2sdk1.4.0.
         2. Run.bat - Executes Publish using \ j2sdk1.4.0\jre\server\jvm.dll.
         3. Webtogo.ora
         4. tnsnames.ora for the Mobile Server.
         5. tnsnames.ora for the Database.
    Feel free to access my server if you need to do so in resolving my problems. The parameters you will need to gain access can be found at the top of Publish.java, and in the included *.ora files.
    Thanks,
    Thomas G. Matney
    [email protected]
    (662)325-2791
    //Start of Publish.java code
    // Oracle HTTP Server URL = http://yggdrasill.cfr.msstate.edu:7778
    // = http://130.18.168.225:7778
    // Mobile Server URL = http://yggdrasill.cfr.msstate.edu/webtogo/startup
    // = http://130.18.168.225/webtogo/startup
    // Mobile Server Control Center URL = http://yggdrasill.cfr.msstate.edu/webtogo
    // = http://130.18.168.225/webtogo
    // Mobile Server Control Center URL = http://yggdrasill.cfr.msstate.edu/webtogo
    // = http://130.18.168.225/webtogo
    // Mobile Server Control Center username = administrator
    // Mobile Server Control Center password = admin
    // Mobile Server URL = http://yggdrasill.cfr.msstate.edu/webtogo/startup
    // = http://130.18.168.225/webtogo/startup
    // Mobile administrator username = fiafield // Schema FIAFIELD on FIA.CFR.MSSTATE.EDU
    // Mobile administrator password = fiafield // Username and password are the same
    import java.sql.SQLException;
    import java.sql.*;
    import oracle.lite.sync.Consolidator;
    import oracle.lite.sync.ConsolidatorManager;
    import oracle.mobile.admin.ResourceManager;
    import oracle.mobile.admin.ResException;
    import oracle.sql.*;
    import oracle.jdbc.*;
    import oracle.mobile.admin.*;
    public class Publish
    // Schema names and usernames are not case sensitive.
    // UN fiafield = FIAFIELD
    // SCHEMA fiafield = FIAFIELD
    // Schema name/Username, and password used on creation of Mobile Repository
    static String CONS_SCHEMA = "fiafield";
    static String DEFAULT_PASSWORD = "fiafield";
    static String admin_jdbc_url = "jdbc:oracle:oci8:@WEBTOGO.WORLD";
    static String thin_jdbc_url =
    "jdbc:oracle:thin:@YGGDRASILL:1521:FIA.YGGDRASILL.CFR.MSSTATE.EDU";
    static String Publication;
    static String CreateTreeTableShortNames =
    "CREATE TABLE FIAFIELD.ZMTR1TBL("
    + "id FLOAT,"
    + "subp FLOAT,"
    + "rnum FLOAT,"
    + "st FLOAT,"
    + "unit FLOAT,"
    + "cnty FLOAT,"
    + "plot FLOAT,"
    + "cyc FLOAT,"
    + "scyc FLOAT,"
    + "tree FLOAT,"
    + "ncpt FLOAT NULL,"
    + "dist FLOAT NULL,"
    + "diam FLOAT NULL,"
    + "dmht FLOAT NULL,"
    + "dmck FLOAT NULL,"
    + "spec FLOAT NULL,"
    + "lang FLOAT NULL,"
    + "nctc FLOAT NULL,"
    + "stat FLOAT NULL,"
    + "util FLOAT NULL,"
    + "deca FLOAT NULL,"
    + "crat FLOAT NULL,"
    + "ccls FLOAT NULL,"
    + "az FLOAT NULL,"
    + "cond FLOAT NULL,"
    + "tlen FLOAT NULL,"
    + "alen FLOAT NULL,"
    + "lmet FLOAT NULL,"
    + "nctg FLOAT NULL,"
    + "rcul FLOAT NULL,"
    + "ncpd FLOAT NULL,"
    + "dead FLOAT NULL,"
    + "mor FLOAT NULL,"
    + "modm FLOAT NULL,"
    + "dml1 FLOAT NULL,"
    + "dmt1 FLOAT NULL,"
    + "dms1 FLOAT NULL,"
    + "dma1 FLOAT NULL,"
    + "dml2 FLOAT NULL,"
    + "dmt2 FLOAT NULL,"
    + "dms2 FLOAT NULL,"
    + "dma2 FLOAT NULL,"
    + "dml3 FLOAT NULL,"
    + "dmt3 FLOAT NULL,"
    + "dms3 FLOAT NULL,"
    + "dma3 FLOAT NULL,"
    + "dbtr FLOAT NULL,"
    + "dbsp FLOAT NULL,"
    + "nxtn FLOAT NULL,"
    + "dbds FLOAT NULL,"
    + "dbaz FLOAT NULL,"
    + "psta FLOAT NULL,"
    + "fiat FLOAT NULL,"
    + "fhmt FLOAT NULL"
    + ")";
    static String CreateTreeTableLongNames =
    "CREATE TABLE FIAFIELD.ZMTR1TBL("
    + "ID FLOAT,"
    + "SUBPLOT FLOAT,"
    + "RECORD_NUMBER FLOAT,"
    + "STATE FLOAT,"
    + "UNIT FLOAT,"
    + "COUNTY FLOAT,"
    + "PLOT FLOAT,"
    + "CYCLE FLOAT,"
    + "SUBCYCLE FLOAT,"
    + "TREE FLOAT,"
    + "NC_PLOT_TYPE FLOAT,"
    + "DISTANCE FLOAT NULL,"
    + "DIAMETER FLOAT NULL,"
    + "DIAMETER_HEIGHT FLOAT NULL,"
    + "DIAMETER_CHECK FLOAT NULL,"
    + "SPECIES FLOAT NULL,"
    + "LEAN_ANGLE FLOAT NULL,"
    + "NC_TREE_CLASS FLOAT NULL,"
    + "STATUS FLOAT NULL,"
    + "UTILIZATION FLOAT NULL,"
    + "DECAY FLOAT NULL,"
    + "CROWN_RATIO FLOAT NULL,"
    + "CROWN_CLASS FLOAT NULL,"
    + "AZIMUTH FLOAT NULL,"
    + "CONDITION FLOAT NULL,"
    + "TOTAL_LENGTH FLOAT NULL,"
    + "ACTUAL_LENGTH FLOAT NULL,"
    + "LENGTH_METHOD FLOAT NULL,"
    + "NC_TREE_GRADE FLOAT NULL,"
    + "ROTTEN_CULL FLOAT NULL,"
    + "NC_PREVIOUS_DBH FLOAT NULL,"
    + "CAUSE_OF_DEATH FLOAT NULL,"
    + "MORTALITY_YEAR FLOAT NULL,"
    + "MO_DAMAGE FLOAT NULL,"
    + "DAMAGE_LOCATION1 FLOAT NULL,"
    + "DAMAGE_TYPE1 FLOAT NULL,"
    + "DAMAGE_SEVERITY1 FLOAT NULL,"
    + "NC_DAMAGE_AGENT1 FLOAT NULL,"
    + "DAMAGE_LOCATION2 FLOAT NULL,"
    + "DAMAGE_TYPE2 FLOAT NULL,"
    + "DAMAGE_SEVERITY2 FLOAT NULL,"
    + "NC_DAMAGE_AGENT2 FLOAT NULL,"
    + "DAMAGE_LOCATION3 FLOAT NULL,"
    + "DAMAGE_TYPE3 FLOAT NULL,"
    + "DAMAGE_SEVERITY3 FLOAT NULL,"
    + "NC_DAMAGE_AGENT3 FLOAT NULL,"
    + "DB_TREE FLOAT NULL,"
    + "DB_SPECIES FLOAT NULL,"
    + "NEXT_NUMBER FLOAT NULL,"
    + "DB_DISTANCE FLOAT NULL,"
    + "DB_AZIMUTH FLOAT NULL,"
    + "PREVIOUS_STATUS FLOAT NULL,"
    + "FIA_TREE_NUMBER FLOAT NULL,"
    + "FHM_TREE FLOAT NULL"
    + ")";
    public static void main(String argv[]) throws Throwable
    // Publish - an OKAPI sample
    if(argv.length == 2)
    CONS_SCHEMA = argv[0] ;
    DEFAULT_PASSWORD = argv[1] ;
    //create required tables using standard jdbc
    //DriverManager.registerDriver ((Driver)Class.forName ("oracle.jdbc.driver.OracleDriver").newInstance ());
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    Connection c = null;
    Statement s = null;
    try
    // Open connection to Mobile Repositoty/FIAFIELD schema as SYSTEM.
    // Need the ability to grant resources, and connection to Mobile Repository user
    //c = DriverManager.getConnection ("jdbc:oracle:oci8:@WEBTOGO.WORLD", "SYSTEM", "phwphw" );
    // Remote connection. See attached webtogo.ora.
    c = DriverManager.getConnection ("jdbc:oracle:oci8:@WEBTOGO.WORLD.YGG",
    "SYSTEM", "phwphw");
    s = c.createStatement ();
    try
    s.executeUpdate("DROP table FIAFIELD.ZMTR1TBL");
    catch (SQLException ee)
    ee.printStackTrace ();
    try
    s.executeUpdate(CreateTreeTableShortNames);
    catch (SQLException ee)
    ee.printStackTrace ();
    try
    s.executeUpdate("alter table FIAFIELD.ZMTR1TBL add constraint"
    +" zmtr1tbl_pk primary key(subp, tree)");
    catch (SQLException ee)
    ee.printStackTrace ();
    // Line 223 // create consolidator publications.
    try
    // *****!!!!! Unless the Webtogo.ora file is in the current working
    // directory the connection is not made. This version of the resource
    // manager must be looking for the file in the old 8i Mobile default
    // directory. This is a definite problem. If the code was working, the
    // addition of the webtogo.ora should have affect on the functionality
    // of the code.
    // The connection is made to the Mobile Server. At least no exceptions
    // are thrown, provided the webtogo.ora is in the current working
    // directory.
    //oracle.mobile.admin.ResourceManager.openConnection(CONS_SCHEMA, DEFAULT_PASSWORD);
    // I tried making a direct connect to possibly avoid needing to have the
    // webtogo.ora file in the current directory. The direct coonect did not work.
    // You can quickly convince yourself that the webtogo.ora file must
    // be in the current working directory, by running the code with and
    // without the webtogo.ora in the current working directory.
    // The directory OraLiteHome\Mobile\Server\bin is in the PATH after
    // after installation but the extension .ora is not in PATHEXT. The
    // OraLite installer should put .ora in PATHEXT. I tried adding .ora
    // to the PATHEXT, but it still could not find thw webtogo.ora file,
    // and it should have. What is going on? I am a bit rusty on DOS so
    // I may not have thing right.
    // OraLiteHome\Mobile\Server\bin is the residing directory for
    // the functional copy of the webtogo.ora file.
    oracle.mobile.admin.ResourceManager.openConnection(
    CONS_SCHEMA,
    DEFAULT_PASSWORD,
    "jdbc:oracle:oci8:@WEBTOGO.WORLD");
    catch(ResException ee)
    ee.printStackTrace (); // NULL Pointer Exception?
    // The Mobile user is created, and then the function throws a resource exception.
    // This is a serious problem with the code. One would assume that the user
    // is not created if and exception is thrown.
    // This appears to be a bug in the createUser code. The function should return
    // false if the user is not created, and handle, or not throw the exception.
    // The function always returns false. It does return true when a user is created
    // because it throws an exception.
    boolean bIsCreated;
    System.out.println("Begin of why is ResourceManager not dropping users?");
    // Line 277
    try
    // The dropUser function will not drop a user. I have tested the function
    // by creating the user ZMPT1UA in the Mobile Server Control Center
    // http://Yggdrasill.cfr.msstate.edu/webtogo
    // so I know that the user exist.
    // This function throws a ResException but it is not declared correctly
    // since you cannot trap the exception as a ResException. It always tells
    // me the view does not exist. What steps are required to get the function
    // to work? What function calls need to be made prior to calling the dropUser
    // function.
    oracle.mobile.admin.ResourceManager.dropUser("ZMPT1UA");
    catch (Throwable ee)
    ee.printStackTrace (); // NULL Pointer Exception?
    System.out.println("End of why is ResourceManager not dropping users?");
    try
    bIsCreated = oracle.mobile.admin.ResourceManager.createUser(
    "ZMPT1UA",
    DEFAULT_PASSWORD,
    "ZMPT1UA", "S");
    catch (Throwable ee)
    ee.printStackTrace (); // Ignore exception
    // Obsolete or depreciated function, according to documentation?
    oracle.mobile.admin.ResourceManager.commitTransaction();
    // Create CONS_SCHEMA user on the database with the same username, and
    // password as the user on the Mobile Server side. This is why the
    // DriverManager connection was made as SYSTEM/phwphw.
    // Grant ALL to repository, and user on replicated database
    // On the database side there is a user with un = fiafield,
    // and pw = fiafield, which is the same as the Mobile Repository
    // schema name/password pair fiafield/fiafield. Can this duality
    // create a problem? Probably not.
    // Need SYSTEM ADMIN privilages for the next two steps, and that is
    // why the coonection was established as SYSTEM/phwphw.
    // Make user, and grants for Publish to user CONS_SCHEMA, and ZMPT1UA
    System.out.println("Pargress point D");
    try
    s.execute("Create user " + "ZMPT1UA" + " identified by " + DEFAULT_PASSWORD);
    catch (SQLException ee)
    ee.printStackTrace (); // ignore
    try
    s.execute("GRANT ALL ON FIAFIELD.ZMTR1TBL to " + CONS_SCHEMA + " WITH GRANT OPTION");
    catch (SQLException ee)
    ee.printStackTrace (); // ignore
    try
    s.execute("GRANT ALL ON FIAFIELD.ZMTR1TBL to " + "ZMPT1UA" + " WITH GRANT OPTION");
    catch (SQLException ee)
    ee.printStackTrace (); // ignore
    /* This code is not needed to test the code
    // Insert items into table FIAFIELD.ZMTR1TBL from FIAFIELD.HUSKY_TREE
    String Statement =
    "INSERT INTO FIAFIELD.ZMTR1TBL SELECT * from FIAFIELD.HUSKY_TREE WHERE PLOT = 1";
    try
    s.execute(Statement);
    catch (SQLException ee)
    System.out.println("FIAFIELD.HUSKY_TREE was not inserted into FIAFIELD.ZMTR1TBL");
    ee.printStackTrace (); // ignore
    c.commit ();
    catch (SQLException ee)
    ee.printStackTrace ();
    finally
    if (s!= null) try {s.close ();}catch (SQLException e1){}
    if (c!= null) try {c.close ();}catch (SQLException e2){}
    // The Consolidator class is not thread safe, and I will eventually
    // need thread safety. The ConsolidatorManage class is thread safe.
    //Consolidator ConsolidatorXX = new Consolidator();
    ConsolidatorManager ConsolidatorXX = new ConsolidatorManager();
    // Line 386
    // Try opening a connection. Sample11 does not open a connection, but it seems
    // like a logical first thing to do.
    // At least with this connection the DropPublication, and AddPublication functions
    // appear to work, or at least they do not throw exceptions. The DropPublication
    // throws an exception if a publication does not exist? I tested this and indeed
    // if I call the DropPublication function, and do not create the Publication again
    // when I reenter the program the DropPublication function throws an exception, and
    // produces the correct error message(The publication does not exist). There is hope.
    // It is very disturbing that the program fails unless the webtogo.ora file is not
    // in the current working directory. Because the OpenConnection functions of both
    // the ResourceManager, and ConsolidatorManager both appear to need access to the
    // webtogo.ora file, and they are finding them in the current directory, the
    // logical conclusion is that both of the classes are attempting to open the
    // webtogo.ora with the relative path webtogo.ora, and not the absolute path
    // OraHomeLite/Mobile/Server/Bin/webtogo.ora. As this has to be the case, why
    // is this very important fact not in the documentation? Or, am I wrong?
    Connection conn = null;
    try
    //ConsolidatorXX.OpenConnection(CONS_SCHEMA,
    //DEFAULT_PASSWORD);
    //ConsolidatorXX.OpenConnection(CONS_SCHEMA,
    //DEFAULT_PASSWORD,
    //"jdbc:oracle:oci8:@WEBTOGO.WORLD");
    conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@WEBTOGO.WORLD",
    CONS_SCHEMA,DEFAULT_PASSWORD);
    //conn = DriverManager.getConnection
    //("jdbc:oracle:oci8:@WEBTOGO.WORLD",
    //"SYSTEM","phwphw");
    ConsolidatorXX.OpenConnection(conn);
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    // Publication name
    Publication = "ZMTR1PUB";
    try
    ConsolidatorXX.DeinstantiateSubscription(Publication, "ZMPT1UA");
    catch (Throwable e)
    System.out.println("Could not Deinstantiate Subscription ZMPT1UA");
    e.printStackTrace(); //ignore error
    // Line 448
    // There is no Consolidator.OpenConnection in the orginal sample11.java code.
    // Why?. It appears to be neccessary. The only way I can make the sample11 code
    // or this program work is to open a jdbc connection with the Consolidator.OpenConnection
    // function. I assume that somehow the Consolidator.OpenConnection function was
    // deleted from sample11.java.
    // This try to drop a publication index does not work, because when I try
    // to recreate the index in the following code it warns me that I have a
    // bad column name for the index. So it thinks the index still exist.
    // Why?. How do I get rid of the index?
    try
    ConsolidatorXX.DropPublicationItemIndex("ZMTR1IX1");
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    ConsolidatorXX.DropPublicationItem("ZMTR1ITM");
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    ConsolidatorXX.DropPublication(Publication);
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    //ConsolidatorXX.CreatePublication(Publication, Consolidator.OKPI_CREATOR_ID,
    //"zMTR1.%s", null);
    ConsolidatorXX.CreatePublication(Publication, Consolidator.OKAPI_WINCE,
    "zMTR1.%s", null);
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    ConsolidatorXX.DropPublicationItemIndex("ZMTR1IX1");
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    try
    ConsolidatorXX.CreatePublicationItem("ZMTR1ITM","FIAFIELD","ZMTR1TBL", "F",
    "SELECT * FROM FIAFIELD.ZMTR1TBL", null, null);
    catch (Throwable e)
    e.printStackTrace();
    System.out.println("Begin of how can drop this index and get rid of the warning?");
    // Line 522
    // I defined the index ZMTR1IX1 originally on the variable subp, and did not get
    // any warning. I then changed the index variable for the index to id, and started
    // receiving the warning to check the index column for typographical errors. Even
    // if I change the index variable back to subp, I continue to receive the warning.
    // How do I get rid of the index and the warning, so I can recreate the index for
    // another variable? I quess the real question is "How to I completely remove a
    // publication, and all of its parts so I can start over?
    try
    ConsolidatorXX.CreatePublicationItemIndex(
    "ZMTR1IX1", "ZMTR1ITM", "I", "id");
    catch (Throwable e)
    e.printStackTrace ();
    System.out.println("End of how can drop this index and get rid of the warning?");
    try
    ConsolidatorXX.AddPublicationItem(
    Publication, "ZMTR1ITM", null, null, "S", null, null);
    catch (Throwable e)
    e.printStackTrace ();
    try
    ConsolidatorXX.CreateSubscription(Publication, "ZMPT1UA");
    catch (Throwable e)
    e.printStackTrace ();
    try
    ConsolidatorXX.InstantiateSubscription(Publication, "ZMPT1UA");
    catch (Throwable e)
    e.printStackTrace ();
    try
    ConsolidatorXX.CloseConnection();
    if(conn != null)
    conn.close();
    catch (Throwable e)
    e.printStackTrace(); //ignore error
    // Obsolete or depreciated function, according to documentation?
    oracle.mobile.admin.ResourceManager.commitTransaction();
    oracle.mobile.admin.ResourceManager.closeConnection();
    End of Publish.java code     
    Begin Compile.bat
    set CLASSPATH = .;D:\jdk1.4.0\lib\tools.jar;D:\OraLite501\MOBILE\classes\CONSOLIDATOR.JAR;D:\OraLite501\MOBILE\SERVER\BIN\WEBTOGO.JAR;D:\OraLite501\jdbc\lib\classes12.zip;D:\OraLite501\MOBILE\classes\classgen.jar;D:\OraLite501\MOBILE\classes\servlet.jar;D:\OraLite501\MOBILE\CLASSES\OLITE40.JAR
    set PATH= d:\jdk1.4.0\jre\bin\server;d:\jdk1.4.0\bin;D:\OraLite501\bin;D:\OraLite501\Mobile\Server\bin;D:\oracle\ora92\bin;D:\OraLite501\MOBILE\sdk\bin
    d:\jdk1.4.0\bin\javac Publish.java
    End Compile.bat          
    Begin Run.bat
    set CLASSPATH= .;D:\jdk1.4.0\lib\tools.jar;D:\OraLite501\MOBILE\classes\CONSOLIDATOR.JAR;D:\OraLite501\MOBILE\SERVER\BIN\WEBTOGO.JAR;D:\OraLite501\jdbc\lib\classes12.zip;D:\OraLite501\MOBILE\classes\classgen.jar;D:\OraLite501\MOBILE\classes\servlet.jar;D:\OraLite501\MOBILE\CLASSES\OLITE40.JAR
    set PATH= d:\jdk1.4.0\jre\bin\server;d:\jdk1.4.0\bin;D:\OraLite501\bin;D:\OraLite501\Mobile\Server\bin;D:\oracle\ora92\bin;D:\OraLite501\MOBILE\sdk\bin
    d:\jdk1.4.0\bin\java Publish
    End Run.bat
    Begin webtogo.ora
    USE_SYSTEM_CLASSPATH = NO
    MODE = SERVER
    PORT = 80
    BASE_URL=/webtogo
    ADMIN_TNS_NAME=WEBTOGO.WORLD
    ADMIN_JDBC_URL=jdbc:oracle:oci8:@WEBTOGO.WORLD
    APPLET_USE_THIN_JDBC = YES
    THIN_JDBC_URL=jdbc:oracle:thin:@YGGDRASILL:1521:FIA.YGGDRASILL.CFR.MSSTATE.EDU
    SITE_OFFLINE_PERIOD=0
    CUSTOM_WORKSPACE=no
    CUSTOM_DIRECTORY=myworkspace
    DEFAULT_PAGE=myfirstpage.html
    ADMIN_USER=8B37E78535B55525292A3A2929292999
    ADMIN_PASSWORD=873515A838B85828292A3A2929292999
    [EXTERNAL_AUTHENTICATION]
    #CLASS=com.acme.SampleAuthenticator
    # Web-to-go workspace's font
    FONT_NAME=Arial
    [FILESYSTEM]
    #ROOT_DIR=%WEBTOGO_HOME%\server
    #TYPE=O8
    #TYPE=OL
    #TYPE=OS
    # Cache size in MBs
    #CACHE_SIZE=10
    MAX_CONNECTIONS=4
    [DEBUG]
    #ENABLE=YES
    # The log file name.
    #LOG_FILE=test.log
    # Machine name and port where wsh.exe -m is running. Web-to-go
    # will send debug output to that machine.
    #MACHINE=
    #PORT=100
    [APPLICATIONS]
    XMLFILE = ws1.xml
    PACK_HELP=D:\OraLite501\mobile\doc\wtg\html\wtgdep.htm
    [PUBLIC]
    oracle.lite.sync.ConsolidatorServlet=/Consolidator
    [CONSOLIDATOR]
    # Installer will change these values
    SERVER_VERSION=8.1.5
    # 8.0.5 or 8.1.5
    # Installer won't change these values
    MAX_THREADS=3
    JDBC_DRIVER=oracle.jdbc.driver.OracleDriver
    CREATE_USER_OPTIONS_O8I=PROFILE CONSOLIDATOR_CLIENT_P DEFAULT TABLESPACE USERS QUOTA UNLIMITED ON USERS TEMPORARY TABLESPACE INDX QUOTA UNLIMITED ON INDX
    CREATE_USER_OPTIONS_O8=PROFILE CONSOLIDATOR_CLIENT_P DEFAULT TABLESPACE USR QUOTA UNLIMITED ON USR
    TEMPORARY TABLESPACE TEMPORARY QUOTA UNLIMITED ON TEMPORARY
    TEMP=c:\\temp
    WTG_PROXY_PORT=80
    TRACE=NO
    TRACE_ALL=NO
    End webtogo.ora
    Begin Mobile Server tnsnames.ora file
    # TNSNAMES.ORA Network Configuration File: D:\OraLite501\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    WEBTOGO.WORLD =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = YGGDRASILL.CFR.MSSTATE.EDU)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    WEBTOGO.WORLD.YGG =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = YGGDRASILL.CFR.MSSTATE.EDU)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    End Mobile Server tnsnames.ora file
    Begin Database tnsnames.ora file
    # TNSNAMES.ORA Network Configuration File: D:\oracle\ora92\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    INST1_HTTP.CFR.MSSTATE.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = SHARED)
    (SERVICE_NAME = MODOSE)
    (PRESENTATION = http://HRService)
    FIA.CFR.MSSTATE.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    FIA.YGGDRASILL.CFR.MSSTATE.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill.cfr.msstate.edu)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    FIA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    FIA.YGG =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = yggdrasill.cfr.msstate.edu)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = FIA.YGGDRASILL.CFR.MSSTATE.EDU)
    EXTPROC_CONNECTION_DATA.CFR.MSSTATE.EDU =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    End Database tnsnames.ora file

  • List component question

    Hello,
    I have flash cs4, and I am using a list component. I know how to open swf when somebody clicks on the list, but is there any way to tell the component to open a .pdf file on  a new window using the list component?
    thanks for your guidance
    Cheers.

    You just need to link to the pdf like you would link to any web page.  The code you use depends on the version of actionscript you are using...
    AS2:  getURL("http://www.yourdomain.com/your.pdf", "_blank");
    AS3: navigateToURL(new URLRequest("http://www.yourdomain.com/your.pdf"), "_blank");

  • Improper code structure

    I am working on a jsp page and I am struggling with the proper way to indent my code. I know this is simple, but I just need a little direction first. If someone would be willing to show me how to format my code that would be most appreciated.
    <HTML>
    <HEAD>
    <TITLE>OakMapper Tree Submittal</TITLE>
    </HEAD>
    <BODY BGCOLOR="BBE4C6" TEXT="0E351A">
    <%@ page language="java" %>
    <!--Importing the Packages-->
    <%@ page import = "java.sql.*" %>
    <%
    String strEmail = null;
    String strSpecies = null;
    String strOther_Tree = null;
    String strBackground = null;
    String strBackgr = null;
    String strSetting = null;
    String strSettingoth = null;
    String strFrass = null;
    String strDead_Leave = null;
    String strCrown_Disc = null;
    String strBark_Disco = null;
    String strBore_Holes = null;
    String strShoot_Dieb = null;
    String strBleeding = null;
    String strHypoxylon = null;
    String strAddress = null;
    String strCity = null;
    String strZipcode = null;
    String strCounty = null;
    String strZone = null;
    String strY = null;
    String strX = null;
    String strFrass1 = null;
    String strDead_Leave1 = null;
    String strCrown_Disc1 = null;
    String strBark_Disco1 = null;
    String strBore_Holes1 = null;
    String strShoot_Dieb1 = null;
    String strBleeding1 = null;
    String strHypoxylon1 = null;
    %>
    <TABLE COL="3" WIDTH="100%" BORDER=0 CELLSPACING="0" CELLPADDING="0" NOWRAP>
    <TR>
    <TD WIDTH="130">
    <A HREF="http://oakmapper.espm.berkeley.edu/" TARGET="_blank">
    <IMG SRC="images/logo.gif" WIDTH="130" HEIGHT="130" BORDER=0></A>
    </TD>
    <TD ALIGN="CENTER">
    <IMG SRC="images/title_submittal.gif" BORDER=0>
    </TD>
    <TD WIDTH="198">
         <TABLE BORDER=0>
         <TR>
         <TD>
         <A HREF="http://www.suddenoakdeath.org/" TARGET="_blank">
         <IMG SRC="images/oaklogo_green.gif" WIDTH="198" HEIGHT="72" BORDER=0></A>
         </TD>
         </TR>
         <TR>
         <TD>  
         <A HREF="http://camfer.cnr.berkeley.edu/" TARGET="_blank">
         <IMG SRC="images/aboutcamfer.jpg" WIDTH="152" HEIGHT="65" BORDER=0></A>
         </TD>
         </TR>
         </TABLE>
    </TD>
    </TR>
    </TABLE>
    <TABLE CELLPADDING=5 BORDER=0>
    <TR HEIGHT="50"> 
    </TR>
    <TR>
    <TD WIDTH="100%"><FONT FACE="Arial" SIZE="-1">
    The University of California's Center for the Assessment and Monitoring of Forest and Environmental Resources (<A HREF="http://camfer.cnr.berkeley.edu/" TARGET="_blank">CAMFER</A>), along with the California Oak Mortality Task Force (<A HREF="http://www.suddenoakdeath.org/" TARGET="_blank">COMTF</A>), has developed the OakMapper Tree Submittal as a tool to assist in the monitoring of Sudden Oak Death (SOD) in California.
    <BR><BR> It is part of a large effort to document the distribution of Sudden Oak Death.  Please note, however, that trees submitted to this website represent <i>symptoms</i> of and <i>potential</i> distribution of SOD, and should not be assumed to be laboratory confirmations of SOD.
    <BR>
    <BR>
    In addition to submitting to the Tree Submittal, please contact your county's Cooperative Extension contact and/or Agricultural Commissioner's Office to notify them about your symptomatic tree.  For contact information, please see the <a href="http://www.cnr.berkeley.edu/comtf/pages/counties.html" target="_blank">County Contacts page</a>.
    <BR>
    <BR>
    For a printer-friendly PDF version of this form to print out to take with you to record symptoms, please download the <a href="OakMapper Tree Submittal.pdf" TARGET="_blank">OakMapper Tree Submittal</a>
    </FONT>
    </TD>
    </TR>
    </TABLE>
    <FORM method=post  ACTION=test.jsp >
    <FONT FACE="Arial" SIZE="-1">
    <TABLE CELLPADDING=4 BORDER=0>
    <TR>
    <TD WIDTH="20%" VALIGN="top"><FONT FACE="Garamond" SIZE="+2"><B>Tree<BR>Identification:</B></FONT>
    <BR><BR><FONT SIZE="-1">Enter information for a single specimen.  Select the tree that most closely resembles the affected tree.<BR><BR><B>Note: </B>Click on photo to view the <a href="http://elib.cs.berkeley.edu/calflora/" TARGET="_blank">CalFlora</a> ID Key.  For species other than those shown on the right, enter in the text box below.
    <BR><BR>Other Species:</FONT>
    <BR><INPUT TYPE="text" NAME="OTHER_TREE">
    </TD>
    <TD WIDTH="35">
    </TD>
    <TD>
         <TABLE CELLPADDING=4 BORDER=0>
         <TR>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://elib.cs.berkeley.edu/cgi/img_query?where-taxon=Quercus+agrifolia" TARGET="_blank">
         <IMG SRC="images/coastliveoak.jpg" BORDER=0 height=134 width=168></a>          </TD>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://elib.cs.berkeley.edu/cgi/img_query?where-taxon=Lithocarpus+densiflorus&special=calflora&where-anno=1" TARGET="_blank">
         <IMG SRC="images/tanoak.jpg" BORDER=0 height=134 width=168></a>
         </TD>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://elib.cs.berkeley.edu/cgi/img_query?where-taxon=Quercus+kelloggii&special=calflora&where-anno=1" TARGET="_blank">
         <IMG SRC="images/blackoak.jpg" BORDER=0 height=134 width=168></a>
         </TD>
         </TR>
         <TR>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="radio" NAME="SPECIES" VALUE="Coast Live Oak"><B> Coast Live Oak</B>
         </TD>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="radio" NAME="SPECIES" VALUE="Tanoak"><B> Tanoak</B>
         </TD>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="radio" NAME="SPECIES" VALUE="Black Oak"><B> Black Oak</B>
         </TD>
         </TR>
         </TABLE>
    </TD>
    </TR>
    <TR HEIGHT="30"> 
    </TR>
    <TR>
    <TD WIDTH="20%" VALIGN="top"><FONT FACE="Garamond" SIZE="+2"><B>Personal<BR>Information:</B></FONT>
    <BR><BR><FONT SIZE="-1">Please select the option below which best describes your background in arboricultural, forestry or pest management sciences.</FONT>
    </TD>
    <TD WIDTH="35">
    </TD>
    <TD>
    <INPUT TYPE="radio" NAME="BACKGROUND" VALUE="None"><B> None</B>
    <BR><INPUT TYPE="radio" NAME="BACKGROUND" VALUE="Limited"><B> Limited</B>
    <BR><INPUT TYPE="radio" NAME="BACKGROUND" VALUE="Hobbiest"><B> Hobbiest</B>
    <BR><INPUT TYPE="radio" NAME="BACKGROUND" VALUE="Academic"><B> Academic but not professional</B>
    <BR><INPUT TYPE="radio" NAME="BACKGROUND" VALUE="Professional"><B> Professional</B>
    <BR><INPUT TYPE="radio" NAME="BACKGROUND" VALUE="Other"><B> Other</B>
    <BR>      <INPUT TYPE="text" NAME="BACKGR">
    </TD>
    </TR>
    <TR HEIGHT="30"> 
    </TR>
    <TR>
    <TR>
    <TD WIDTH="20%" VALIGN="top"><FONT FACE="Garamond" SIZE="+2"><B>Environmental<BR>Setting:</B></FONT>
    <BR><BR><FONT SIZE="-1">Please select a description which most closely matches the environmental setting of the specimen.</FONT>
    </TD>
    <TD WIDTH="35">
    </TD>
    <TD>
    <INPUT TYPE="radio" NAME="SETTING" VALUE="None"><B> Residential area - landscaped</B><BR><FONT SIZE="-1">      (scattered shade trees, watered lawn, or garden)</FONT>
    <BR><INPUT TYPE="radio" NAME="SETTING" VALUE="Residential"><B> Residential area - natural setting</B><BR><FONT SIZE="-1">      (not watered or landscaped, native or naturalized </FONT>plants)
    <BR><INPUT TYPE="radio" NAME="SETTING" VALUE="Street trees"><B> Street trees</B>
    <BR><INPUT TYPE="radio" NAME="SETTING" VALUE="Natural"><B> Natural setting right of way trees</B><BR><FONT SIZE="-1">      (not watered or landscaped, native or naturalized </FONT>plants)</FONT>
    <BR><INPUT TYPE="radio" NAME="SETTING" VALUE="Landscaped park"><B> Landscaped park setting</B><BR><FONT SIZE="-1">      (scattered shade trees, watered lawn, or garden)</FONT>
    <BR><INPUT TYPE="radio" NAME="SETTING" VALUE="Natural oak woodland"><B> Natural oak woodland setting</B><BR><FONT SIZE="-1">      (Live Oak, Valley Oak, Bay, Black Oak)</FONT>
    <BR><INPUT TYPE="radio" NAME="SETTING" VALUE="Natural forest"><B> Natural forest setting</B><BR><FONT SIZE="-1">      (e.g., Redwood, Douglas-fir, or Tanoak composition)</FONT>
    <BR><INPUT TYPE="radio" NAME="SETTING" VALUE="Other"><B> Other/Additional</B><BR><FONT SIZE="-1">      (please provide brief description below):</FONT>
    <BR>      <INPUT TYPE="text" NAME="SETTINGOTH">
    </TD>
    </TR>
    <TR HEIGHT="30"> 
    </TR>
    <TR>
    <TD WIDTH="20%" VALIGN="top"><FONT FACE="Garamond" SIZE="+2"><B>Symptoms:</B></FONT>
    <BR><BR><FONT SIZE="-1">These images illustrate the symptoms that are typically caused by the pathogen affecting the oak and tanoak trees.  Please compare these images carefully with symptoms you have observed, then check the corresponding check boxes below to provide descriptive information on the specimen.
    <BR><BR><B>Note:</B> Click on the thumbnails to view larger version of Photo and written description.</FONT>
    </TD>
    <TD WIDTH="35">
    </TD>
    <TD>
         <TABLE CELLPADDING=4 BORDER=0>
         <TR>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://oakmapper.espm.berkeley.edu/oaks/submittal/symptoms/seeping.htm" BORDER=0 TARGET="_blank">
         <IMG SRC="images/seeping.jpg" BORDER=0 height=147 width=140></a>
         </TD>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://oakmapper.espm.berkeley.edu/oaks/submittal/symptoms/barkdiscoloration.htm" BORDER=0 TARGET="_blank">
         <IMG SRC="images/bleeding.jpg" BORDER=0 height=147 width=140></a>
         </TD>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://oakmapper.espm.berkeley.edu/oaks/submittal/symptoms/crowndiscoloration.htm" BORDER=0 TARGET="_blank">
         <IMG SRC="images/crowndiscoloration.jpg" BORDER=0 height=147 width=140></a>
         </TD>
         </TR>
         <TR>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="checkbox" NAME="BLEEDING" VALUE="-1"><B> Seeping</B>
         </TD>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="checkbox" NAME="BARK_DISCO" VALUE="-1"><B> Bark discoloration</B>
         </TD>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="checkbox" NAME="CROWN_DISC" VALUE="-1"><B> Crown discoloration (except deciduous)</B>
         </TD>
         </TR>
         <TR>
         </TR>
         <TR>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://oakmapper.espm.berkeley.edu/oaks/submittal/symptoms/deadleaves.htm" TARGET="_blank">
         <IMG SRC="images/deadleaves.jpg" BORDER=0 height=147 width=140></a>
         </TD>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://oakmapper.espm.berkeley.edu/oaks/submittal/symptoms/shootdieback.htm" BORDER=0 TARGET="_blank">
         <IMG SRC="images/shootdieback.jpg" BORDER=0 height=147 width=140></a>
         </TD>
         <TD ALIGN="center" VALIGN="middle">
         <A HREF="http://oakmapper.espm.berkeley.edu/oaks/submittal/symptoms/hypoxylon.htm" BORDER=0 TARGET="_blank">
         <IMG SRC="images/hypoxylon.jpg" BORDER=0 height=147 width=140></a>
         </TD>
         </TR>
         <TR>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="checkbox" NAME="DEAD_LEAVE" VALUE="-1"><B> Numerous brown<BR>(dead) leaves</B>
         </TD>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="checkbox" NAME="SHOOT_DIEB" VALUE="-1"><B> Shoot die-back</B>
         </TD>
         <TD ALIGN="center" VALIGN="top">
         <INPUT TYPE="checkbox" NAME="HYPOXYLON" VALUE="-1"><B> Fungus (Hypoxylon)</B>
         </TD>
         </TR>
         <TR>
         </TR>
         <TR>
         <TD ALIGN="center" COLSPAN="3">
              <TABLE CELLPADDING=7 BORDER=0>
              <TR>
              <TD ALIGN="center" VALIGN="middle">
              <A HREF="http://oakmapper.espm.berkeley.edu/oaks/submittal/symptoms/frass.htm" TARGET="_blank">
              <IMG SRC="images/frass.jpg" BORDER=0 height=147 width=140></a>
              </TD>
              <TD ALIGN="center" VALIGN="middle">
              <A HREF="http://oakmapper.espm.berkeley.edu/oaks/submittal/symptoms/boreholes.htm" TARGET="_blank">
              <IMG SRC="images/boreholes.jpg" BORDER=0 height=147 width=140></a>
              </TD>
              </TR>
              <TR>
              <TD ALIGN="center" VALIGN="top">
              <INPUT TYPE="checkbox" NAME="FRASS" VALUE="-1"><B> Beetle frass<BR>("saw dust")</B>
              </TD>
              <TD ALIGN="center" VALIGN="top">
              <INPUT TYPE="checkbox" NAME="BORE_HOLES" VALUE="-1"><B> Beetle bore holes</B>
              </TD>
              </TR>
              </TABLE>
         </TD>
         </TR>
         </TABLE>
    </TR>
    <TR HEIGHT="30"> 
    </TR>
    <TR>
         <TR>
         <TD WIDTH="20%" VALIGN="top"><FONT FACE="Garamond" SIZE="+2"><B>Tree Location:</B></FONT>
         <BR><BR><FONT SIZE="-1">Enter the street address OR the XY location of the tree (see example below).
         <BR><BR><B>Note:</B> All street addresses and emails are kept completely confidential.</FONT>
         </TD>
         <TD WIDTH="35">
         </TD>
         <TD>
         <BR><B><U>Street Address</U> (preferred)</B>
         <BR>
         <BR><B>Complete Street Address or nearest intersection:</B>
         <BR><INPUT TYPE="text" NAME="ADDRESS">  <FONT SIZE="-1">Example: 2011 Francisco St., or Francisco St. & Park Ave.</FONT>
         <BR>
         <BR><B>City Name:</B>
         <BR><INPUT TYPE="text" NAME="CITY">  <FONT SIZE="-1">Example: Berkeley</FONT>
         <BR>
         <BR><B>Zip Code:</B>
         <BR><INPUT TYPE="text" NAME="ZIPCODE">  <FONT SIZE="-1">Example: 94709</FONT>
         <BR>
         <BR><B>County:</B>
         <BR><INPUT TYPE="text" NAME="COUNTY">  <FONT SIZE="-1">Example: Alameda</FONT>
         <BR>
         <BR>
         <BR><B><U>XY Coordinates</U> (optional if address is entered above)</B>
         <BR>
         <BR>If entering an XY location, use either State Plan or latitude/longitude coordinates.
         <BR>Examples of both types of acceptable projections:
         <BR>
         <BR>CA STATE PLANE include the zone, and please use Datum = NAD83, and units = meters:
         <BR>X coordinate --> 5973541.75
         <BR>Y coordinate --> 2238728.00
         <BR>
         <BR>LATITUDE / LONGITUDE:
         <BR>Latitude --> 38-22-15
         <BR>Longitude --> -122-30-29
         <BR>
         <BR><B>X Coordinate:</B>
         <BR><INPUT TYPE="text" NAME="X">  <FONT SIZE="-1">Example: 5983541.75 (State Plane), or -122-30-29 (Longitude)</FONT>
         <BR>
         <BR><B>Y Coordinate:</B>
         <BR><INPUT TYPE="text" NAME="Y">  <FONT SIZE="-1">Example: 2238728.00 (State Plane), or 38-22-15 (Latitude)</FONT>
         <BR>
         <BR><B>California State Plane Zone:</B>
         <BR><INPUT TYPE="text" NAME="ZONE">  <FONT SIZE="-1">Example: III (for a listing of zones by county, go <a href="http://www.pipeline.com/%7Erking/spc.htm#CA" TARGET="_blank">here</a>)</FONT>
         <BR>
         <BR>
         <BR>
         <BR>
         <BR>Please enter your e-mail for possible follow-up and mailing of submission receipt (mailing and e-mail addresses are kept completely confidential):
         <BR><B>E-mail Address:</B>
         <BR><INPUT TYPE="text" NAME="EMAIL">  <FONT SIZE="-1">Example: [email protected]</FONT>
         </TD>
         </TR>
         </TABLE>
    </TR>
    </TABLE>
    <TABLE ALIGN="CENTER" BORDER=0 WIDTH="60%">
    <TR>
    <TD ALIGN="CENTER">
    Please note that by submitting this information, you agree to let us map your site on our Sudden Oak Death distribution map and browser as a point within 1 mile of the site.  Your address will NOT be released and will only be used for general locating the symptomatic tree.
    </TD>
    </TR>
    <TR HEIGHT="40"> 
    </TR>
    <TR>
    <TD ALIGN="CENTER"><B><BR>
    <BR>Thank you very much for your submittal!</B>
    </TD>
    </TR>
    <BR>
    <BR>
    <TABLE ALIGN="center" WIDTH="60%" BORDER="0">
    <TR><TD ALIGN="center">
    <BR>
    In addition, please contact your county's Cooperative Extension contact and/or Agricultural Commissioner's Office to notify them about your symptomatic tree.
    <BR>
    <BR>For contact information, please see the <a href="http://www.cnr.berkeley.edu/comtf/pages/counties.html" target="_blank">County Contacts page</a>.
    <BR>
    <BR>
    <TR HEIGHT="50"> 
    </TR>
    </TABLE>
    <CENTER><INPUT TYPE="Submit" NAME="SUBMIT" VALUE="Submit Tree"></CENTER><BR>
    </FORM>
    </TD></TR></TABLE>
    <%
    //Creating Database Instanse
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:SuddenOak","","");
    //Creating the Connection Statement
    Statement statement = con.createStatement();
    ResultSet recset = statement.executeQuery("Select * From Treesubmittals where SubmissionID>0");
    %>
    <%
    if (strEmail !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.EMAIL" + request.getParameter("strEmail"));
    statement.executeUpdate("INSERT INTO Treesubmittal.GEOCODED Pending");
    statement.executeUpdate("INSERT INTO Treesubmittal.DATE_ENTER Date");
    if (strSpecies !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.SPECIES" + request.getParameter("strSpecies"));
    if (strOther_Tree !=""); {
    statement.executeUpdate("INSERT INTO Treesubmittal.OTHER_TREE" + request.getParameter("strOther_Tree"));
    if (strBackground !="") ;{
    statement.executeUpdate("INSERT INTO Treesubmittal.BACKGROUND" + request.getParameter("strBackground"));
    if (strBackgr !=""); {
    statement.executeUpdate("INSERT INTO Treesubmittal.BACKGR" + request.getParameter("strBackgr"));
    if (strSetting !=""); {
    statement.executeUpdate("INSERT INTO Treesubmittal.SETTING" + request.getParameter("strSetting"));
    if (strSettingoth !=""); {
    statement.executeUpdate("INSERT INTO Treesubmittal.SETTINGOTH" + request.getParameter("strSettingoth"));
    if (strDead_Leave !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.DEAD_LEAVE Yes");
    if (strCrown_Disc !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.CROWN_DISC Yes");
    if (strBark_Disco !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.BARK_DISCO Yes");
    if (strBore_Holes !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.BORE_HOLES Yes");
    if (strShoot_Dieb !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.SHOOT_DIEB Yes");
    if (strBleeding !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.BLEEDING Yes");
    if (strHypoxylon !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.HYPOXYLON Yes");
    if (strFrass !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.FRASS Yes");
    if (strAddress !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.ADDRESS" + request.getParameter("strAddress"));
    if (strCity !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.CITY" + request.getParameter("strCity"));
    if (strZipcode !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.ZIPCODE" + request.getParameter("strZipcode"));
    if (strCounty !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.COUNTY" + request.getParameter("strCounty"));
    if (strZone !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.ZONE" + request.getParameter("strZone"));
    if (strY !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.Y" + request.getParameter("strY"));
    if (strX !="") {
    statement.executeUpdate("INSERT INTO Treesubmittal.X" + request.getParameter("strX"));
    if (strDead_Leave !="") {
    strDead_Leave1="Yes";
    else{
    strDead_Leave1="No";
    if (strCrown_Disc !="") {
    strCrown_Disc1="Yes";
    else{
    strCrown_Disc1="No";
    if (strBark_Disco !="") {
    strBark_Disco1="Yes";
    else{
    strBark_Disco1="No";
    if (strBore_Holes !="") {
    strBore_Holes1="Yes";
    else{
    strBore_Holes1="No";
    if (strShoot_Dieb !="") {
    strShoot_Dieb1="Yes";
    else{
    strShoot_Dieb1="No";
    if (strBleeding !="") {
    strBleeding1="Yes";
    else{
    strBleeding1="No";
    if (strHypoxylon !="") {
    strHypoxylon1="Yes";
    else{
    strHypoxylon1="No";
    if (strFrass !="") {
    strFrass1="Yes";
    else{
    strFrass1="No";
    %>
    <BR>
    <BR>
    <BR>
    <BR>
    <BR>
    <CENTER>
    <font face="Arial,Helvetica">You are person #<IMG SRC="http://counter.digits.com/wc/-r/-d/4/-c/2/-f/0E351A/-b/F4F4FF/-e/F4F4FF/OakMapper2" ALIGN=absmiddle WIDTH=60 HEIGHT=20 BORDER=0> to access the OakMapper Tree Submittal since we began counting on February 15, 2002.
    <BR><BR>
    Provided by </FONT><A HREF="http://www.digits.com" target="_blank"><IMG SRC="wc-01.gif" ALIGN=absmiddle WIDTH=75 HEIGHT=20 BORDER=0></A>
    </center>
    <BR>
    <BR>
    <CENTER>
    <HR WIDTH="85%">
    <p><font color="#0E351A"><font face="Arial, Helvetica, sans-serif"><a href="http://camfer.cnr.berkeley.edu/oaks/" TARGET="_blank">Oaks
    Research Home</a></font> | <font face="Arial"><a href="http://www.suddenoakdeath.org/" TARGET="_blank">California
    Oak Mortality Task Force</a></font> | <font face="Arial, Helvetica, sans-serif"><a href="http://camfer.cnr.berkeley.edu/" TARGET="_blank">CAMFER
    Home</a></font></font>
    <br>
    <br>
    <br><font face="Arial, Helvetica, sans-serif"><font size=-2>For questions,
    comments or problems concerning this web site, please contact Karin Tuxen
    at: <a href="mailto:[email protected]">[email protected]</a></font></font>
    </center>
    <%
    out.println("Thank you for submitting to the OakMapper Tree Submittal.  " + "<BR>" + "<BR>");
    out.println("In addition, please contact your county's Cooperative Extension contact and/or Agricultural Commissioner's Office.  " + "<BR>" + "For contact information, please see http://www.cnr.berkeley.edu/comtf/pages/counties.html" + "<BR>" + "<BR>");
    out.println("Below is a summary of your submittal:" +"<BR>" + "Tree species = " + recset.getString("strSpecies") + "<BR>" + "Other tree species = " + recset.getString("strOther_Tree") + "<BR>");
    out.println("Background in arboricultural, forestry or pest management sciences = " + recset.getString("strBackground") + "<BR>" + "Other background, if applicable = " + recset.getString("strBackgr") + "<BR>");
    out.println("Environmental Setting = " + recset.getString("strSetting") + "<BR>" + "Other background, if applicable = " + recset.getString("strSettingoth") + "<BR>" + "Seeping = " + recset.getString("strBleeding") + "<BR>");
    out.println("Bark discoloration = " + recset.getString("strBark_Disco1") + "<BR>" + "Crown discoloration = " + recset.getString("strCrown_Disc1") + "<BR>" + "Numerous brown dead leaves = " + recset.getString("strDead_Leave1") + "<BR>");
    out.println("Shoot die-back = " + recset.getString("strShoot_Dieb1") + "<BR>" + "Fungus - Hypoxylon = " + recset.getString("strHypoxylon1") + "<BR>" + "Beetle frass = " + recset.getString("strFrass1") + "<BR>" + "Beetle bore holes = " + recset.getString("strBore_Holes1")  + "<BR>");
    out.println("Address - this will be kept completely confidential = " + recset.getString("strAddress") + "<BR>" + "City = " + recset.getString("strCity") + "<BR>" + "Zip Code = " + recset.getString("strZipCode") + "<BR>" + "County = " + recset.getString("strCounty") + "<BR>");
    out.println("Zone = " + recset.getString("strZone") + "<BR>" + "X coordinate = " + recset.getString("strX") + "<BR>" + "Y coordinate = " + recset.getString("strY") + "<BR>");
    //I am little unsure how to update the CDONTS.NewMail
    //Set objNewReceipt = Server.CreateObject("CDONTS.NewMail")
    //objNewReceipt.From = "[email protected]"
    //objNewReceipt.To = strEMAIL
    //objNewReceipt.Bcc = "[email protected]"
    //objNewReceipt.Subject = "Thank you for submitting to the OakMapper!"
    //objNewReceipt.Body = strBody
    //objNewReceipt.Send
    //Response.Redirect "result.htm"
    %>
    </body>
    </html>

    First, when declaring multiple variables of the same type, rather than..
    String blah="";
    String blah2="";
    Use:
    String blah="", blah2="";
    And typically you <tab> in once for each layer in a loop or table, etc(the further you go in, the more you <tab> in)..for example:
    <TABLE COL="3" WIDTH="100%" BORDER=0>
    <TR>
    <TD> </TD>
    </TR>
    </TABLE>
    To save space, you can put <tr> on the front and end of whatever line you're editing, so you can cut down on the number of lines..
    <BR>Some content in here<BR>
    Hope that helps!
    -Adam

  • Code best practice question LV2013

    I am still fairly new to LabVIEW programming and I have been learning from the online self paced classes. I started in June of 2012.
    I am currently working on a new program front panel (host) vi and I am trying to determine a better way to implement a certain section of my code so that it works the way I would like it too. This vi is being designed for a touchscreen interface so all user input is touch screen input.
    What I want the code to do: the code is designed so when the user presses the command button on the front panel vi it creates an information pop-up window explaining the parameters for input. The user pushes the OK button (closes the info pop-up) and opens a new sub-vi that is a numeric keypad. If the user input is within the accepted parameters then when 'enter' is pushed the sub-vi closes and inputs the value to a numeric indicator. If the user inputs an incorrect value, then the keypad sub-vi closes and another info window pops up informing the user 'incorrect value - re-enter value' user hits the OK button and closes the info box and reopens the keypad sub-vi. This cycle should continue until the operator inputs a valid value.
    What the code does as written: when the user presses the command button on the front panel vi it creates an information pop-up window explaining the parameters for input. The user pushes the OK button (closes the info pop-up) and opens a new sub-vi that is a numeric keypad. If the user input is within the accepted parameters then when 'enter' is pushed the sub-vi closes and inputs the value to a numeric indicator. If the user inputs an incorrect value, then the keypad sub-vi closes and another info window pops up informing the user 'incorrect value - re-enter value' user hits the OK button and closes the info box and reopens the keypad sub-vi. If now on the second attempt the user still inputs an incorrect value and presses 'enter' the keypad sub-vi closes and I have had to defer the value to output '0' (or some minimum allowed value).
    So the question I am trying to figure out is this. Is there a better way to implement this section of code to work like I want it to, maybe using shift registers or something and where would they go?
    I am using the most current version of LabVIEW 2013.
    The code as pictured works great outside the fact that I have to stop it after two attempts otherwise the code would have to be rewritten for each failure and it would look like staring off into oblivion between two mirrors.
    Thanks,
    Solved!
    Go to Solution.
    Attachments:
    code question.jpg ‏429 KB

    Gearmiester wrote:
    What I want the code to do: the code is designed so when the user presses the command button on the front panel vi it creates an information pop-up window explaining the parameters for input. The user pushes the OK button (closes the info pop-up) and opens a new sub-vi that is a numeric keypad. If the user input is within the accepted parameters then when 'enter' is pushed the sub-vi closes and inputs the value to a numeric indicator. If the user inputs an incorrect value, then the keypad sub-vi closes and another info window pops up informing the user 'incorrect value - re-enter value' user hits the OK button and closes the info box and reopens the keypad sub-vi. This cycle should continue until the operator inputs a valid value.
    Why do you check for valid entry outside the sub-vi that allows the operator to input a value?  You could simply monitor each keystroke (every character entered) and have a small algorithm that checks for a correct entry on the fly (while it is being entered).  You could change the color of the text to red and make a brief description appear below the string control which describes valid entries.  Keep it simple.
    Gearmiester wrote:
    What the code does as written: when the user presses the command button on the front panel vi it creates an information pop-up window explaining the parameters for input. The user pushes the OK button (closes the info pop-up) and opens a new sub-vi that is a numeric keypad. If the user input is within the accepted parameters then when 'enter' is pushed the sub-vi closes and inputs the value to a numeric indicator. If the user inputs an incorrect value, then the keypad sub-vi closes and another info window pops up informing the user 'incorrect value - re-enter value' user hits the OK button and closes the info box and reopens the keypad sub-vi. If now on the second attempt the user still inputs an incorrect value and presses 'enter' the keypad sub-vi closes and I have had to defer the value to output '0' (or some minimum allowed value).
    Why is the 2nd attempt different than the others?  It does not matter how many attempts are made... since it is not an automated process, but human interaction.  Surely, the operators are trained and would have an idea of what should be entered.  Additional instructions can be provided within documentation that accompanies the application.
    Gearmiester wrote:
    So the question I am trying to figure out is this. Is there a better way to implement this section of code to work like I want it to, maybe using shift registers or something and where would they go?
    I am using the most current version of LabVIEW 2013.
    The code as pictured works great outside the fact that I have to stop it after two attempts otherwise the code would have to be rewritten for each failure and it would look like staring off into oblivion between two mirrors.
    Do you absolutely want it to work as described within your first paragraph?  There are always "better ways" to do things, that's a personal preference..  Maybe you should ask the people that will be using the application to get their feedback (operators).  That's what I usually do.
    Using the latest LabVIEW version is fine, but has little or no impact on the implementation decisions. 
    If all you really want is to fix the code to prevent it from stopping after 2 attempts, then show us a code snippet of what you have done.

Maybe you are looking for

  • Error while connecting to db

    Hi, We are getting the error while connecting the database. ERROR: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist IBM AIX RISC System/6000 Error: 2: No such file or directory Error persists only for second or two & agai

  • Using database link to connect to two databases

    Hi guys, Here's my question. I need to give a contractor Select rights on tables located in two schemas located on two different servers. One server is dev and one is prod. Let's say we have schema user: EMPLOYEE on dev and schema user: DEPARTMENT on

  • Why I am experiencing video freezing using FaceTime.

    Using an iMac intel OS 10.6.8 and connecting to MacBook Pro with FaceTime, I experience video freezes and broken audio. The other party (MacBook) does not seem to have the same issue leading me to believe it is something to do with the iMac. I tried

  • Weiße Konturen bei Vektorgrafiken (AI) in After Effects (3D Ebene)

    Hallo, eine importierte Illustrator-Grafik (Vektorgrafik) in After Effects bereitet mir Kopfzerbrechen. Um die Grafik im 3D-Raum zu animieren aktiviere ich den Ebenenschalter "3D-Ebene". Außerdem möchte ich das die Grafik auch entsprechend einer Vekt

  • Error: Illegal syntax for elaborated type specifier

    Hi , I am using Solaris 8 with SunStudio8 C++ 5.5 compiler I have defined following lines in my header file msgg.h typedef class DIMessageStringBase<char> DIMessageString; typedef class DIMessageStringBase<UChar> DIMessageStringU; On compilation I am