Need help with Xquery Syntax.

Hi there,
I am using a Berkeley XML DB and I have a xquery which I need to execute in a particular format. I have the following xquery:
for $a in collection("test.dbxml")/Bookstore/Book where $a/book_ID/text() eq "6" return $a/book_ID/text()
This xquery runs fine and I have the end result to be 6.
I need the same result to be specified in a XML TAG like <order_ID> 6 </order_ID> for which I have the following xquery:
for $a in collection"test.dbxml")/Bookstore/Book where $a/book_ID/text() eq "6" return <order_ID>$a/book_ID/text()</order_ID>
This xquery runs but return me back with the string "<order_ID>$a/book_ID/text()</order_ID>".
Can you please help me to correct the above output to result in "<order_ID> 6 </order_ID>"
Thanks.

Try
for $a in collection("test.dbxml")/Bookstore/Book
where $a/book_ID/text() eq "6"
return <order_ID>{$a/book_ID/text()}</order_ID>Lauren Foutz
Edited by: LaurenFoutz on Apr 17, 2009 9:41 AM

Similar Messages

  • Need help with e4x syntax for children in ADG TreeView column

    I would like to display Hierarchical XML data as a treeView
    in a ADG control. I can bind the first (parent) level of my XML to
    the ADG using a HierarchicalData Dataprovider, but I can't figure
    out the syntax to get the children.
    The attached code shows the function where the XML is
    received, and evaluated one level deep. The var "eventdefs" is the
    ..Group nodes of the XML, and the declaration of the ADG. The ADG
    binds the eventdefs as hierarchical data, and specifies one column
    with the datafield as @eventgroup. This works fine and shows the
    top level nodes.
    I have specified Event as the childrenfield, but I don't see
    anything in the data grid - nor do I understand how to specify a
    different value of datafield for the second level of nodes.
    I want to show the value of the attribute "eventgroup" on
    parent nodes, and show the value of the attribute "description"
    next to the child nodes. Can this be specified in the mxml? Or do I
    need a label function, or something else?
    TIA!
    Here is my XML document:
    <list>
    <Group eventgroup="">
    <Event uniqueid="63" description="Error:enter valid Email
    Address " displayorderingroup="60" displayorder="86" />
    <Event uniqueid="64" description="Error:unable to find
    account for email address " displayorderingroup="61"
    displayorder="87" />
    </Group>
    <Group eventgroup="CEP Events">
    <Event uniqueid="244" description="CEP:EveryHit; "
    displayorderingroup="242" displayorder="253" />
    </Group>
    </list>
    <mx:Script>
    <![CDATA[
    [Bindable("eventDefsChanged")]
    private var _eventDefs:Object;
    public function set eventDefs(m:Object):void
    // We expect m to be a XML document, with "Group" as the
    name of the highest level (parent) nodes
    _eventDefs = m..Group;
    adg_es.dataProvider = eventDefs;
    adg_es.validateNow();
    dispatchEvent( new Event( "eventDefsChanged" ) );
    public function get eventDefs():Object
    return _eventDefs;
    ]]>
    </mx:Script>
    <mx:AdvancedDataGrid id = "adg_es"
    displayItemsExpanded="true">
    <mx:dataProvider>
    <mx:HierarchicalData id ="hd" source = "{new
    HierarchicalData(eventDefs)}" childrenField="Event"/>
    </mx:dataProvider>
    <mx:columns>
    <mx:AdvancedDataGridColumn dataField="@eventgroup"/>
    </mx:columns>
    </mx:AdvancedDataGrid>

    Use TAKE function 
    int numberOfrecords=10; // read from user
    listOfItems.OrderByDescending(x => x.CreatedDate).Take(numberOfrecords)

  • Need help with XQuery

    I have 2 xml documents Team and Player
    Here is how they look like
    team.xml
    <Teams>
      <Team>
      <Lost>59</Lost>
      <Name>NewYork</Name>
      <Won>103</Won>
      </Team>
      <Team>
      </Team>
    <Teams>
    player.xml
    <Players>
      <Player>
      <Age>24</Age>
      <Team>NewYork</Team>
      <BOB>67</BOB>
      <SOT>265</SOT>
      <IPT>229.3</IPT>
      </Player>
      <Player>
      </Player>
    <Players>I want to write a xquery to dsiplay for each team; the number of good* players, the avg age of good players, the number of total players and avg age of total players.
    The criteria for a good player is (BOB + SOT) / IPT < 0.91.
    This what I tried
    for $x in distinct-values (doc("team.xml")/Teams/Team/Team)
    let $y:= doc("player.xml")/Players/Player[Team=$x]
    return
    <Team>
         <Team_Name>{data($x)}</Team_Name>
         <Total_players>{count($y)}</Total_players>
         <Average_Age>{avg($y/Age)}</Average_Age>
    </Team>Using this I get the the number of total players and avg age of total players. However, i'm not sure how I can modify this to return the information about good players as well.
    Can someone please help me with this.
    Thanks.

    Try something like this
    xquery version "1.0";
    <Table>
    for $x in distinct-values (doc("team.xml")/Teams/Team/Name)
         let $y:= doc("player.xml")/Players/Player[Team=$x]
         let $z:= $y[(BOB + SOT) div IPT < 0.91]
         return
         <Team>
              <Team_Name>{data($x)}</Team_Name>
              <Total_players>{count($y)}</Total_players>
              <Good_players>{count($z)}</Good_players>
              <Average_Age>{avg($y/Age)}</Average_Age>
              {for $p in $y
              return
                   <PlayerRating>
                        {$p/Age}
                        <GoodPlayer>{$p/BOB + $p/SOT div $p/IPT lt 0.91}
                        </GoodPlayer>
                        <PlayerScore>
                        {$p/BOB + $p/SOT div $p/IPT}
                        </PlayerScore>
                   </PlayerRating>
         </Team>
    </Table>HTH,
    chris
    Edited by: chrisis on Nov 28, 2009 1:59 PM

  • Need help with the syntax of VHDTool.exe

    I'm about to extend the size of a VHD to 40GB. I'm using the following syntax and it's not working.
    vhdtool.exe /expand servername.vhd 42949672960 [/quiet]
    I can't find anywhere where it states how to enter the numerical value. Can someone please verify this syntax ?? The value that's there is in bytes

    Resolved:
    Apparently it needs quotes around the pathname:  vhdtool.exe /expand "C:\hyperv\servername.vhd" 42949672960

  • Need help with incorrect syntax error during a record update

    I'm getting the error below but I cannot figure out what I'm doing wrong.
    Error Executing Database Query.
    [Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'WHERE'.
    The error occurred in C:\ColdFusion9\wwwroot\Intranet\DM\Admin\Maintenance-BulbBaseType.cfm: line 23
    21 :             UPDATE [Bulb Base Type Table]
    22 :             SET [BulbBaseTypeDesc] = '#TxtBulbBaseTypeDesc#',
    23 :             WHERE ([BulbBaseTypeID] = #TxtID#)
    24 :         </cfquery>
    25 :         <cfset TxtID = 0>
    I have set my cfparam as:
    <cfparam name="Submit" default="">
    <cfparam name="TxtID" default=0>
    <cfparam name="TxtBulbBaseTypeDesc" default="">

    A good rule of thumb when encountering this sort of error message is to examine the preceding line of code.
    If you do that with your query, you should spot the trailing comma at the end of the line.
    Also: read up on CFQUERYPARAM.  Don't hard-code dynamic values in your SQL string.
    Adam

  • Need help with sql syntax....

    The table  "tblL" has columns a1 and a2. When the "where" clause is commented the query out runs fine. When "where" is uncommented I get a syntax error. Any help appreciated.
    select a1, a2 from
    select top 5 * from tblL
    ) as T
    -- wbere (T.a1 = T.a2)                  -- when uncommented get syntax error
    -- wbere (a1 = a2)                       -- when uncommented get syntax error too
    Error:
    "Incorrect syntax near 'wbere'...."
    TIA,
    edm2

    "Incorrect syntax near 'wbere'...."
    The keyword is wHere, not wBere, you typed a B instead of H
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Beginner needs help with gotoAndPlay syntax

    Hello out there.
    I am modifying a Flash template which I downloaded recently
    The following code has been placed on a symbol which is defined as a button.
    on (release) {
    _root.link = 3;
    _root.gates.gotoAndPlay ("s1");
    I interpret this code to mean that _root.gates is the instance name which is located in the root timeline and it will move the play head to the frame labeled s1 in the gates instance which I assume is a movie clip.
    How do I locate the gates instance in the flash file. I have looked at every symbol in the entire flash file and none of them have instance names.
    Please help if you can. Thanks

    You've probably narrowed it down to being an object from the library.  Now you need to see if it is either on the stage or is loaded dynamically.
    If you right click on the object in the library and select Linkage..., you'll be able to see if it might be loaded dynamically.  In order to load it dynamically, in the Liinkage panel it will need to have the Export for Actionscript option checked (and one other) and will have an Identifier defined for it.  This identifier is what will be used to pull it from the library via actionscript (using the attachMovie method).
    If it doesn't have things in the Linkage established as I've described, then it likely lives on the stage.  If you are unable to find it, then it may be on a masked layer, or it may be set invisible on the timeline, or it may have a blank first frame which would make it appear as a mere dot on the stage if selected.
    Now, regardless of whether you find how it's added to the stage, if your intention is to edit this object in some way, You don't necessarily have to figure out the details of how its added to the stage.  To check if the object in the library is the one you want to edit, edit it in some simple way so that you can tell if the item you edit is the item you want edited.  If it is, then do the editing you intend.

  • Need help with Return syntax

    I though that the two pieces of code below would perform the same function but apparently i am missing something. The code is supposed to multiply two integers. Both use the add method.
    //Method that adds two integers this method works great
    public static int add(int a, int b)
             if(a <= 0)
                return (a < 0) ? add(MCH.succ(a), MCH.pred(b)) : b;
             else
                return (a > 0) ? add(MCH.pred(a), MCH.succ(b)) : b;
          }//The variable total is defined earlier as what ever a originally was and is not modified.
      //This method for multiplying also works great for positive numbers but i wanted to shorten it.
      public static int multiply(int a, int b)
              if(b==1)
                    return a;
              return multiply(add(total,a),--b) ;
        //This code i though was the same as above just in one line but apparently not
        //10*10 will return 10
        // 5*5 will return 5
        public static int multiply(int a, int b)
              return (b==1) ? multiply(add(total,a),--b) : a;
          }Why are the two sections of code returning different values. Any help is much appreciated

    I tried 5*6 which produced 5 as an answer using the second version of multiply so it looks like no matter what i put in the output is always the first int.

  • ADO Database Connection: Need help with correct syntax for 'Execute' Method

    My server Windows 2008R2 taking more than 30 hours to complete backup
    so next backup getting fail
    is there any option to set start backup after 24 hours if previous backup complete

    I have a script that I am trying to cobble together, but I am stuck at attempting to execute an SQL query against and ADO connection. My code is as follows:Powershell $FQDNUpper = $Computer.ToUpper() + ".domain.dn1.dn2" $FQDNLower = $Computer.ToLower() + ".domain.dn1.dn2" $shell = New-Object -ComObject "Wscript.Shell" # for use later in script $cnn = New-Object -ComObject "ADODB.Connection" $cnn.ConnectionString = "Connection_String" $cnn.Open() $query = "SELECT CAST(ID AS nvarchar(50)) ID FROM Machine WHERE Name=$FQDNUpper AND Role = 0" $rs = $cnn.Execute($query,' ',1) #If statement that will qualify if $FQDNUpper returned anything else try $FQDNLowerWhen executing the code I receive an error:
    PowershellArgument: '2' should be a System.Management.Automation.PSReference. Use [ref].At line:9 char:5+ $rs = $cnn.Execute($query,' ',1)+ ...

  • Need help with Berkeley XML DB Performance

    We need help with maximizing performance of our use of Berkeley XML DB. I am filling most of the 29 part question as listed by Oracle's BDB team.
    Berkeley DB XML Performance Questionnaire
    1. Describe the Performance area that you are measuring? What is the
    current performance? What are your performance goals you hope to
    achieve?
    We are measuring the performance while loading a document during
    web application startup. It is currently taking 10-12 seconds when
    only one user is on the system. We are trying to do some testing to
    get the load time when several users are on the system.
    We would like the load time to be 5 seconds or less.
    2. What Berkeley DB XML Version? Any optional configuration flags
    specified? Are you running with any special patches? Please specify?
    dbxml 2.4.13. No special patches.
    3. What Berkeley DB Version? Any optional configuration flags
    specified? Are you running with any special patches? Please Specify.
    bdb 4.6.21. No special patches.
    4. Processor name, speed and chipset?
    Intel Xeon CPU 5150 2.66GHz
    5. Operating System and Version?
    Red Hat Enterprise Linux Relase 4 Update 6
    6. Disk Drive Type and speed?
    Don't have that information
    7. File System Type? (such as EXT2, NTFS, Reiser)
    EXT3
    8. Physical Memory Available?
    4GB
    9. Are you using Replication (HA) with Berkeley DB XML? If so, please
    describe the network you are using, and the number of Replica’s.
    No
    10. Are you using a Remote Filesystem (NFS) ? If so, for which
    Berkeley DB XML/DB files?
    No
    11. What type of mutexes do you have configured? Did you specify
    –with-mutex=? Specify what you find inn your config.log, search
    for db_cv_mutex?
    None. Did not specify -with-mutex during bdb compilation
    12. Which API are you using (C++, Java, Perl, PHP, Python, other) ?
    Which compiler and version?
    Java 1.5
    13. If you are using an Application Server or Web Server, please
    provide the name and version?
    Oracle Appication Server 10.1.3.4.0
    14. Please provide your exact Environment Configuration Flags (include
    anything specified in you DB_CONFIG file)
    Default.
    15. Please provide your Container Configuration Flags?
    final EnvironmentConfig envConf = new EnvironmentConfig();
    envConf.setAllowCreate(true); // If the environment does not
    // exist, create it.
    envConf.setInitializeCache(true); // Turn on the shared memory
    // region.
    envConf.setInitializeLocking(true); // Turn on the locking subsystem.
    envConf.setInitializeLogging(true); // Turn on the logging subsystem.
    envConf.setTransactional(true); // Turn on the transactional
    // subsystem.
    envConf.setLockDetectMode(LockDetectMode.MINWRITE);
    envConf.setThreaded(true);
    envConf.setErrorStream(System.err);
    envConf.setCacheSize(1024*1024*64);
    envConf.setMaxLockers(2000);
    envConf.setMaxLocks(2000);
    envConf.setMaxLockObjects(2000);
    envConf.setTxnMaxActive(200);
    envConf.setTxnWriteNoSync(true);
    envConf.setMaxMutexes(40000);
    16. How many XML Containers do you have? For each one please specify:
    One.
    1. The Container Configuration Flags
              XmlContainerConfig xmlContainerConfig = new XmlContainerConfig();
              xmlContainerConfig.setTransactional(true);
    xmlContainerConfig.setIndexNodes(true);
    xmlContainerConfig.setReadUncommitted(true);
    2. How many documents?
    Everytime the user logs in, the current xml document is loaded from
    a oracle database table and put it in the Berkeley XML DB.
    The documents get deleted from XML DB when the Oracle application
    server container is stopped.
    The number of documents should start with zero initially and it
    will grow with every login.
    3. What type (node or wholedoc)?
    Node
    4. Please indicate the minimum, maximum and average size of
    documents?
    The minimum is about 2MB and the maximum could 20MB. The average
    mostly about 5MB.
    5. Are you using document data? If so please describe how?
    We are using document data only to save changes made
    to the application data in a web application. The final save goes
    to the relational database. Berkeley XML DB is just used to store
    temporary data since going to the relational database for each change
    will cause severe performance issues.
    17. Please describe the shape of one of your typical documents? Please
    do this by sending us a skeleton XML document.
    Due to the sensitive nature of the data, I can provide XML schema instead.
    18. What is the rate of document insertion/update required or
    expected? Are you doing partial node updates (via XmlModify) or
    replacing the document?
    The document is inserted during user login. Any change made to the application
    data grid or other data components gets saved in Berkeley DB. We also have
    an automatic save every two minutes. The final save from the application
    gets saved in a relational database.
    19. What is the query rate required/expected?
    Users will not be entering data rapidly. There will be lot of think time
    before the users enter/modify data in the web application. This is a pilot
    project but when we go live with this application, we will expect 25 users
    at the same time.
    20. XQuery -- supply some sample queries
    1. Please provide the Query Plan
    2. Are you using DBXML_INDEX_NODES?
    Yes.
    3. Display the indices you have defined for the specific query.
         XmlIndexSpecification spec = container.getIndexSpecification();
         // ids
         spec.addIndex("", "id", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addIndex("", "idref", XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // index to cover AttributeValue/Description
         spec.addIndex("", "Description", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_SUBSTRING, XmlValue.STRING);
         // cover AttributeValue/@value
         spec.addIndex("", "value", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // item attribute values
         spec.addIndex("", "type", XmlIndexSpecification.PATH_EDGE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // default index
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ELEMENT | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         spec.addDefaultIndex(XmlIndexSpecification.PATH_NODE | XmlIndexSpecification.NODE_ATTRIBUTE | XmlIndexSpecification.KEY_EQUALITY, XmlValue.STRING);
         // save the spec to the container
         XmlUpdateContext uc = xmlManager.createUpdateContext();
         container.setIndexSpecification(spec, uc);
    4. If this is a large query, please consider sending a smaller
    query (and query plan) that demonstrates the problem.
    21. Are you running with Transactions? If so please provide any
    transactions flags you specify with any API calls.
    Yes. READ_UNCOMMITED in some and READ_COMMITTED in other transactions.
    22. If your application is transactional, are your log files stored on
    the same disk as your containers/databases?
    Yes.
    23. Do you use AUTO_COMMIT?
         No.
    24. Please list any non-transactional operations performed?
    No.
    25. How many threads of control are running? How many threads in read
    only mode? How many threads are updating?
    We use Berkeley XML DB within the context of a struts web application.
    Each user logged into the web application will be running a bdb transactoin
    within the context of a struts action thread.
    26. Please include a paragraph describing the performance measurements
    you have made. Please specifically list any Berkeley DB operations
    where the performance is currently insufficient.
    We are clocking 10-12 seconds of loading a document from dbd when
    five users are on the system.
    getContainer().getDocument(documentName);
    27. What performance level do you hope to achieve?
    We would like to get less than 5 seconds when 25 users are on the system.
    28. Please send us the output of the following db_stat utility commands
    after your application has been running under "normal" load for some
    period of time:
    % db_stat -h database environment -c
    % db_stat -h database environment -l
    % db_stat -h database environment -m
    % db_stat -h database environment -r
    % db_stat -h database environment -t
    (These commands require the db_stat utility access a shared database
    environment. If your application has a private environment, please
    remove the DB_PRIVATE flag used when the environment is created, so
    you can obtain these measurements. If removing the DB_PRIVATE flag
    is not possible, let us know and we can discuss alternatives with
    you.)
    If your application has periods of "good" and "bad" performance,
    please run the above list of commands several times, during both
    good and bad periods, and additionally specify the -Z flags (so
    the output of each command isn't cumulative).
    When possible, please run basic system performance reporting tools
    during the time you are measuring the application's performance.
    For example, on UNIX systems, the vmstat and iostat utilities are
    good choices.
    Will give this information soon.
    29. Are there any other significant applications running on this
    system? Are you using Berkeley DB outside of Berkeley DB XML?
    Please describe the application?
    No to the first two questions.
    The web application is an online review of test questions. The users
    login and then review the items one by one. The relational database
    holds the data in xml. During application load, the application
    retrieves the xml and then saves it to bdb. While the user
    is making changes to the data in the application, it writes those
    changes to bdb. Finally when the user hits the SAVE button, the data
    gets saved to the relational database. We also have an automatic save
    every two minues, which saves bdb xml data and saves it to relational
    database.
    Thanks,
    Madhav
    [email protected]

    Could it be that you simply do not have set up indexes to support your query? If so, you could do some basic testing using the dbxml shell:
    milu@colinux:~/xpg > dbxml -h ~/dbenv
    Joined existing environment
    dbxml> setverbose 7 2
    dbxml> open tv.dbxml
    dbxml> listIndexes
    dbxml> query     { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }
    dbxml> queryplan { collection()[//@date-tip]/*[@chID = ('ard','zdf')] (: example :) }Verbosity will make the engine display some (rather cryptic) information on index usage. I can't remember where the output is explained; my feeling is that "V(...)" means the index is being used (which is good), but that observation may not be accurate. Note that some details in the setVerbose command could differ, as I'm using 2.4.16 while you're using 2.4.13.
    Also, take a look at the query plan. You can post it here and some people will be able to diagnose it.
    Michael Ludwig

  • I need help with oracle

    Hi,
    I need some help... if someone can help its great.
    I need to make a statement in Oracle SQL that read data from a file and insert in a Oracle Database ... if someone can show me the syntax of it i appreciate..
    Thanks

    Okay, I see you followed the advice in that other thread and started a new post for you question. Congratulations. Your next lesson in forum etiquette is to give your posts a more relevant subject. Pretty much everybody who posts here needs help with oracle; if they need help with cooking catfish they've come to the wrong place.
    It that other thread I suggested using SQL*Loader or External Tables might be a more suitable solution. Find out more.
    Cheers, APC

  • Please, need help with a query

    Hi !
    Please need help with this query:
    Needs to show (in cases of more than 1 loan offer) the latest create_date one time.
    Meaning, In cases the USER_ID, LOAN_ID, CREATE_DATE are the same need to show only the latest, Thanks!!!
    select distinct a.id,
    create_date,
    a.loanid,
    a.rate,
    a.pays,
    a.gracetime,
    a.emailtosend,
    d.first_name,
    d.last_name,
    a.user_id
    from CLAL_LOANCALC_DET a,
    loan_Calculator b,
    bv_user_profile c,
    bv_mr_user_profile d
    where b.loanid = a.loanid
    and c.NET_USER_NO = a.resp_id
    and d.user_id = c.user_id
    and a.is_partner is null
    and a.create_date between
    TO_DATE('6/3/2008 01:00:00', 'DD/MM/YY HH24:MI:SS') and
    TO_DATE('27/3/2008 23:59:00', 'DD/MM/YY HH24:MI:SS')
    order by a.create_date

    Take a look on the syntax :
    max(...) keep (dense_rank last order by ...)
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions056.htm#i1000901
    Nicolas.

  • Need help with a currently "in-use" form we want to switch to Adobes hosting service

    Hi, I am in desperate need of help with some issues concerning several forms which we currently use a paid third party (not Adobe) to host and "re-distribute through email"...Somehow I got charged $14.95 for YOUR service, (signed up for a trial, but never used it)..and now I am paying for a year of use of the similar service which Adobe is in control of.  I might want to port my form distribution through Adobe in the hopes of reducing the errors, problems and hassles my customers are experiencing when some of them push our  "submit button". (and I guess I am familiar with these somewhat from reading what IS available in here, and I also know that, Adobe is working to alleviate some of these " submit"  issues, so let's don't start by going backwards, here) I need solutions now for my issues or I can leave it as is, If Adobe's solution will be no better for my end users...
    We used FormsCentral to code these forms and it works for the most part (if the end-user can co-operate, and thats iffy, sometimes), but I need help with how to make it go through your servers (and not the third party folks we use now), Not being cruel or racist here, but your over the phone "support techs" are about horrible & I cannot understand them or work with any of them, so I would definitely need someone who speaks English and can understand the nuances of programming these forms, to please contact me back. (Sorry, but both those attributes will be required to be able to help me, so, no "newbie-interns" or first week trainees are gonna cut it).... If you have anyone who fits the bill on those items and would be willing to help us, please contact me back at your earliest convenience. If we have to communicate here, I will do that & I can submit whatever we need to & to whoever we need to.
    I need to get this right and working for the majority of my users and on any platform and OS.
    You may certainly call me to talk about this, and I have given my number numerous times to your (expletive deleted) time wasting - recording message thingy. So, If it's not available look it up under [email protected]
    (and you will probably get right to me, unlike my and I'm sure most other folks',  "Adobe phone-in experiences")
    Thank You,
    Michael Corman
    VinylCouture
    Phenix City, Alabama  36869

    Well, thanks for writing back...just so you know...I started using Adobe products in 1987, ...yeah...back then...like Illustrator 1 & 9" B&W Macs ...John Warnock's Helvetica's....stuff like that...8.5 x 11 LaserWriters...all that good stuff...I still have some of it working on a mac...much of it was stuff I bought. some stuff I did not...I'm not a big fan of this "cloud" thing Adobe has foisted upon the creatives of the world...which I'm sure you can tell...but the functionality and usefulness of your software can not be disputed, so feel free to do whatever we will continue to pay for, ...I am very impressed with CC PS on the 64 bit PC and perhaps I will end up paying you the stipend that you demand for the other services.
    So  I guess that brings us to our problem.. a few years back and at the height of the recession and near bankruptcy myself,  I was damn lucky and hit on something and began a small arts and crafts supply service to sell my products online to a very "niche market" ...I had a unique product and still sell that product (plus others) online...My website is www.vinylcouture.com...Strange? Yes...but there is a market it seems, for everything now, and this is the market I service...Catagorically, these are 99%+ women that use these "adhesive, sticky backed vinyl products"  to make different "craft items" that are just way too various and numerous to go into... generally older women, women who are computer illiterate for the most part...and all this is irrelevant to my problem, but I want you to have every bit of background on this and especially the demographic we are dealing with, so we can get right to the meat of the problem.
    OK...So about two years ago, I decided to offer a "plain sheet" product of a plain colored "stick back" vinyl... it is available in multiple quantities of packs ( like 5 pieces, 10 pieces, 15 pieces, in a packi  & so on)...and if you are still on my site.. go to any  "GO RIGHT TO OUR ORDER PAGE"  button, scroll down a little...and then to the "PLAIN VINYL" section...you will see the Weebly website order process.) You can back out from here, I think,..but, anyway this product is available in 63 colors + or - a few. So then the problem is,  how do they select their individual colors within that (whatever) pack?... .
    So my initial idea was to enable a "selection form" for these "colors" that would be transmitted to me via email as 'part" of the "order process".. We tried getting our customers to submit a  " a list" ( something my competitiors still do, lol, poor bastards)......but that..is just unbelievable..I can't even begin to tell you what a freakin' nightmare that was...these people cannot even count to 10, much less any higher... figuring out what colors to list and send me... well, lets just say, it wasn't working......I had to figure out a better way...Something had to be done.
    So after thinking this all out,  and yeah...due to my total ignorance, i figured that we could make a form with Live Cycle Designer (Now Forms Central)...(back then something that was bundled with Adobe Acrobat Pro), I believe, and thats what this thing was authored in... and it would be all good...LOL!
    Well not so simple...as you well know, Adobe Acrobat would NOT LET YOU EMAIL anything from itself.....it just wouldn't work (and I know why, and all that hooey), but not being one to take NO for answer,.I started looking for a way to make my little gizmo work.. So I found this company that said they can "hijack" (re-direct actually) the request to email, bypass the wah-wah, and re-transmit it to the proper parties.....for less than $100 a year,  I think...its called http://pdf-fillableforms.com/.
    A nice gentleman named Joseph Silva helped us program the thing to go to his servers and back out. Please dont hassle them...I need them...for now..it basically does work...try it...you should get back a copy of the form that you filled out...good luck however,  if you're on MAC OSX or similar...
    I have included a copy of both of our forms (and feel free to fill it out and play with it)...just put test somewhere on it...(and you must include YOUR email or it will balk)..they are supposed to be mostly identical, except one seems to be twice as large....generating a 1.7 meg file upon submission, while the other one only generates a 600K file or so...thats another issue for another day or maybe you can advise on that also...
    OK so far so good......In our shop, once Grandma buys a 10 pack (or whatever), Only then she gets to the link on her receipt page ro the relevant "selection form" ,(this prevents "Filling and Sending"  with "no order" and "no payment", another early problem we had)... which they can click on and it will usually download and open up on their device if all goes well...Then our little form is supposed to be fillable and is supposed to ADD UP all the quantities, so grandma knows how many she is buying and so forth right on the fly,  and even while she changes her mind..., and IT'S LARGE so grandma can see it, and then it TOTALS it all up for them, ( cause remember, they can NOT add)..,  except there is a programming bug (mouse-click should be a mouse-up probably or something..) which makes you click in the blank spaces to get to a correct TOTAL...about 70-80% of our customers can enable all these features and usually the process completes without problems for them especially on PC's running Windows OS and Acrobat Reader X or XI...at least for most... Unfortunately it is still not the "seamless process" I would like or had envisioned for the other folks out there that do have trouble using our form....  Many folks report to us the following issues that we know of.  First of all it takes too much time to load up...We know its HUGE...is there anyway that you can see, to streamline this thing? I would love for it to be more compact...this really helps on the phones and pads as I'm sure you well know.
    Some just tell us,"it WON'T work"....I believe this is because they are totally out of it and dont even have Adobe Reader on their machine, & don't know how to get it ( yes, we provide the links).....or it's some ancient version....no one can stop this one...
    It almost always generates some kind ( at least one time)  of "error message" which we do warn them about..., telling one,  basically that "Acrobat doesnt even like this happening at all, and it could be detrimental to ones computer files", blah-blah...(this freaks grandma out really bad)...& usually they end up not even trying to send it...  and then I get calls that even you wouldn't believe...& If they DO nut up and push the Red "Submit Form" button, it will usually send the thing to us (and also back to them at the "required email address" they furnished on the form, thats what the folks at the "fillable forms place" do) so, if it's performing it's functions, why it is having to complain?. What are we doing wrong?....and how can I fix it?...Will re-compiling it or saving it as a newer version of "FormsCentral" correct any of these problems ?
    Ok, so that should keep you busy for a minute and we can start out with those problems...but the next thing is, how can I take advantage of YOUR re-direct & hosting services?, And will it get rid of the error messages, and the slowness, and the iOS incompatibilities ? (amazingly,  the last iOS Reader version worked almost OK.. but the newest version doesnt seem to work with my form on my iphone4)  If it will enable any version of the iOS to send my form correctly and more transparently, then it might be worth the money...$14.95 a MONTH you say. hmmmmm...Better be good.
    Another problem is, that I really don't need 5000 forms a month submitted. I think its like 70-100 or less....Got any plans for that?  Maybe I'm just not BIG ENOUGH to use Adobe's services, however in this case, I really don't care whose I do use as long as the product works most correctly for my customers as well as us. Like I said, If I'm doing the best I can, I won't change anything, and still use the other third party, If Adobe has a better solution, then i'm all for that as well. In the meantime, Thanks for any help you can provide on this...
    Michael Corman
    VinylCouture.com
    (706) 326-7911

  • Need help with JTextArea and Scrolling

    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    public class MORT_RETRY extends JFrame implements ActionListener
    private JPanel keypad;
    private JPanel buttons;
    private JTextField lcdLoanAmt;
    private JTextField lcdInterestRate;
    private JTextField lcdTerm;
    private JTextField lcdMonthlyPmt;
    private JTextArea displayArea;
    private JButton CalculateBtn;
    private JButton ClrBtn;
    private JButton CloseBtn;
    private JButton Amortize;
    private JScrollPane scroll;
    private DecimalFormat calcPattern = new DecimalFormat("$###,###.00");
    private String[] rateTerm = {"", "7years @ 5.35%", "15years @ 5.5%", "30years @ 5.75%"};
    private JComboBox rateTermList;
    double interest[] = {5.35, 5.5, 5.75};
    int term[] = {7, 15, 30};
    double balance, interestAmt, monthlyInterest, monthlyPayment, monPmtInt, monPmtPrin;
    int termInMonths, month, termLoop, monthLoop;
    public MORT_RETRY()
    Container pane = getContentPane();
    lcdLoanAmt = new JTextField();
    lcdMonthlyPmt = new JTextField();
    displayArea = new JTextArea();//DEFINE COMBOBOX AND SCROLL
    rateTermList = new JComboBox(rateTerm);
    scroll = new JScrollPane(displayArea);
    scroll.setSize(600,170);
    scroll.setLocation(150,270);//DEFINE BUTTONS
    CalculateBtn = new JButton("Calculate");
    ClrBtn = new JButton("Clear Fields");
    CloseBtn = new JButton("Close");
    Amortize = new JButton("Amortize");//DEFINE PANEL(S)
    keypad = new JPanel();
    buttons = new JPanel();//DEFINE KEYPAD PANEL LAYOUT
    keypad.setLayout(new GridLayout( 4, 2, 5, 5));//SET CONTROLS ON KEYPAD PANEL
    keypad.add(new JLabel("Loan Amount$ : "));
    keypad.add(lcdLoanAmt);
    keypad.add(new JLabel("Term of loan and Interest Rate: "));
    keypad.add(rateTermList);
    keypad.add(new JLabel("Monthly Payment : "));
    keypad.add(lcdMonthlyPmt);
    lcdMonthlyPmt.setEditable(false);
    keypad.add(new JLabel("Amortize Table:"));
    keypad.add(displayArea);
    displayArea.setEditable(false);//DEFINE BUTTONS PANEL LAYOUT
    buttons.setLayout(new GridLayout( 1, 3, 5, 5));//SET CONTROLS ON BUTTONS PANEL
    buttons.add(CalculateBtn);
    buttons.add(Amortize);
    buttons.add(ClrBtn);
    buttons.add(CloseBtn);//ADD ACTION LISTENER
    CalculateBtn.addActionListener(this);
    ClrBtn.addActionListener(this);
    CloseBtn.addActionListener(this);
    Amortize.addActionListener(this);
    rateTermList.addActionListener(this);//ADD PANELS
    pane.add(keypad, BorderLayout.NORTH);
    pane.add(buttons, BorderLayout.SOUTH);
    pane.add(scroll, BorderLayout.CENTER);
    addWindowListener( new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    String arg = lcdLoanAmt.getText();
    int combined = Integer.parseInt(arg);
    if (e.getSource() == CalculateBtn)
    try
    JOptionPane.showMessageDialog(null, "Got try here", "Error", JOptionPane.ERROR_MESSAGE);
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Got here", "Error", JOptionPane.ERROR_MESSAGE);
    if ((e.getSource() == CalculateBtn) && (arg != null))
    try{
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 1))
    monthlyInterest = interest[0] / (12 * 100);
    termInMonths = term[0] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 2))
    monthlyInterest = interest[1] / (12 * 100);
    termInMonths = term[1] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    if ((e.getSource() == CalculateBtn) && (rateTermList.getSelectedIndex() == 3))
    monthlyInterest = interest[2] / (12 * 100);
    termInMonths = term[2] * 12;
    monthlyPayment = combined * (monthlyInterest / (1 - (Math.pow (1 + monthlyInterest,  -termInMonths))));
    lcdMonthlyPmt.setText(calcPattern.format(monthlyPayment));
    catch(NumberFormatException ev)
    JOptionPane.showMessageDialog(null, "Invalid Entry!\nPlease Try Again", "Error", JOptionPane.ERROR_MESSAGE);
    }                    //IF STATEMENTS FOR AMORTIZATION
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 1))
    loopy(7, 5.35);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 2))
    loopy(15, 5.5);
    if ((e.getSource() == Amortize) && (rateTermList.getSelectedIndex() == 3))
    loopy(30, 5.75);
    if (e.getSource() == ClrBtn)
    rateTermList.setSelectedIndex(0);
    lcdLoanAmt.setText(null);
    lcdMonthlyPmt.setText(null);
    displayArea.setText(null);
    if (e.getSource() == CloseBtn)
    System.exit(0);
    private void loopy(int lTerm,double lInterest)
    double total, monthly, monthlyrate, monthint, monthprin, balance, lastint, paid;
    int amount, months, termloop, monthloop;
    String lcd2 = lcdLoanAmt.getText();
    amount = Integer.parseInt(lcd2);
    termloop = 1;
    paid = 0.00;
    monthlyrate = lInterest / (12 * 100);
    months = lTerm * 12;
    monthly = amount *(monthlyrate/(1-Math.pow(1+monthlyrate,-months)));
    total = months * monthly;
    balance = amount;
    while (termloop <= lTerm)
    displayArea.setCaretPosition(0);
    displayArea.append("\n");
    displayArea.append("Year " + termloop + " of " + lTerm + ": payments\n");
    displayArea.append("\n");
    displayArea.append("Month\tMonthly\tPrinciple\tInterest\tBalance\n");
    monthloop = 1;
    while (monthloop <= 12)
    monthint = balance * monthlyrate;
    monthprin = monthly - monthint;
    balance -= monthprin;
    paid += monthly;
    displayArea.setCaretPosition(0);
    displayArea.append(monthloop + "\t" + calcPattern.format(monthly) + "\t" + calcPattern.format(monthprin) + "\t");
    displayArea.append(calcPattern.format(monthint) + "\t" + calcPattern.format(balance) + "\n");
    monthloop ++;
    termloop ++;
    public static void main(String args[])
    MORT_RETRY f = new MORT_RETRY();
    f.setTitle("MORTGAGE PAYMENT CALCULATOR");
    f.setBounds(600, 600, 500, 500);
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    }need help with displaying the textarea correctly and the scroll bar please.
    Message was edited by:
    new2this2020

    What's the problem you're having ???
    PS.

  • Need help with trim and null function

    Hi all,
    I need help with a query. I use the trim function to get the first three characters of a string. How do I write my query so if a null value occurs in combination with my trim to say 'Null' in my results?
    Thanks

    Hi,
    Thanks for the reply. What am I doing wrong?
    SELECT trim(SUBSTR(AL1.user_data_text,1,3)),NVL
    (AL1.user_data_text,'XX')
    FROM Table
    I want the XX to appear in the same column as the
    trim.The main thing you're doing wrong is not formatting your code. The solution may become obvious if you do.
    What you're saying is:
    SELECT  trim ( SUBSTR (AL1.user_data_text, 1, 3))
    ,       NVL ( AL1.user_data_text, 'XX' )
    FROM    Tablewhich makes it clear that you're SELECTing two columns, when you only want to have one.
    If you want that column to be exactly like the first column you're currently SELECTing, except that when that column is NULL you want it to be 'XX', then you have to apply NVL to that column, like this:
    SELECT  NVL ( trim ( SUBSTR (AL1.user_data_text, 1, 3))
                , 'XX'
    FROM    Table

Maybe you are looking for

  • EWT - giving validity period based on withholding tax code

    Dear Friends, 1) My client is having different withholding tax codes (based on rates) for the same withholding tax type. I have given validity period based on withholding tax type in EWT -> Company code -> Assign withholding tax types to company code

  • TCRMBP_REFCUST --- Replication of BPs from CRM to ECC

    Hi - We have a CRM - ECC (SD / ISU) environment. I have a question about TCRMBP_REFCUST table. 1. How exactly is this table used? Is this table used when replicating the CRM BP into ECC? 2. This table seems to give me a better control over the sales

  • How to call sshr page in custom oaf page

    hey everyone, i would like to access the leave of absence page by creating a link on the custom oaf page. So that whenever i click on this link it will open the below page. Below is the function details for the jsp page that i want the link to open i

  • Is there a way to change the frame size in a sequence?

    I'm using Final Cut Pro 4 and I've looked through help and through the threads in this forum and I haven't found anything that really relates to my problem. I have edited 3 videos. One is 352x288 and the other 2 are 320x240. Is there a way I can chan

  • Short dumps in ST22

    Hi, I get a set of 30 dumps daily on my Solman system. The user is SMD_RFC & the dump is as follows: Runtime Errors         CREATE_DATA_UNKNOWN_TYPE Exception              CX_SY_CREATE_DATA_ERROR Date and Time          28.01.2011 00:30:52 Short text