Simple java/mysql database application question about triggers

I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
thanks for your response

lduren wrote:
I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
It doesn't have anything to do with java at that point.
When you execute, for example, an insert statement, then the database executes that statement. The database (not java, not the driver) decides with that statement is complete. Control returns to java when the database decides that execution is complete.
And except for tricks that one might do (or attempt to do) via SQL or triggers then when the statement execution finishes then everthing has completed running.

Similar Messages

  • Simple Java ME Database Application Question -JSR-169

    Howdy,
    Using Netbeans to make a simple DB app using Derby's EmbeddedSimpleDataSource, show here:
    [http://wiki.apache.org/db-derby/JavaMESupport]
    I'm almost there except for adding the JSR-169 jar file. Apparently you cant just add the folder to the class path. I don't quite understand why they say the JSR-169 jar file needs to be built? I tried adding the classes to the project - no dice. Tried adding the folder to the class path, which usually works, but still no dice.
    Is there a link or anyplace that the JSR-169 jar file can be downloaded? I/m on windows - to be honest I am not sure how to make that file. Forums show a lot of people having trouble trying to make it.

    If you follow the steps from the above link, you should not get any Security Exception. Please note that Derby folks say that you should add jdbc.jar (or jsr169.jar) to your boot class path, not to your class path. This is exactly what needs to be done to avoid the Security Exception. Alternatively you can add the jar to the extension directory (e.g. /lib/jclFoundation11/ext if you use j9 foundation 1.1).

  • Deployment issues-java desktop database application

    hello,
    i'm vasant...recently visited an online tutorial for creating java desktop database application
    here is the URL [http://www.netbeans.org/kb/docs/java/gui-db.html#running-outside-IDE] ...
    everything works fine...when building and executing the application from within the NetBeans IDE..6.7
    but as instructed in that tutorial...when I tried to run the .jar file after exiting the netbeans IDE, it didnt run...
    infact direction has been given in that tutorial for this in the last section....which says that i've to start Java DB from outside the Netbeans IDE...that's where difficulty arises....
    i've no idea how to start Java DB manually...
    i'd really appreciate if nybody der could...help me out plz
    thanx

    spring_patel wrote:
    i really appreciate you trying to solve my problem..
    but i think...my estion is fairly simple and straight forward...and i've provided every detail of my problem(if uv'e read my opening post of this thread)....
    and as far as that link goes...i've already checked it b4 u guys mentioned it... as it is provided right there in the tutorial i've provided link of...
    and i've tried my options b4 making use of this forum...and i didnt find a solution that's why i'm taking ur help..
    nevertheless...i repeat my question...
    there's a tutorial at this link...[http://www.netbeans.org/kb/docs/java/gui-db.html]...in it is described how to create a java desktop database applicaiton...
    at the end of the tuorial there is a section called: "Building and Deploying the Application"
    in that section they have instructed to exit netbeans IDE and try and run the application outside it...which is not happening
    the reason they say is that i've to start Java DB from outside of the IDE...that is wat my problem is ..
    i dont know how to start Java DB from outside the Netbeans ide...You are not telling us anything.
    If I tell you "my automobile doesn't work" how do you know what is wrong. Instead I need to tell you one of the following.
    1. The engine didn't start.
    2. The wheel fell off.
    3. The engine caught fire.
    4. When I went to the driveway the car wasn't even there.
    When you "run" something then something happens. When I run notepad from a console window if notepad is not in the path then I will get an error about command not found. if it is in the path then the command executes and notepad pops up. Even if I don't see notepad pop up I know that the command seemed to execute from the command window.
    The above are examples of describing what you did and what did happen. In detail.
    "It doesn't work" provides neither detail about how you ran it nor what did happen when you did attempt to run it.

  • How to retrive data from MYSQL database beginner question

    I need to know a method, on how to retrieve values from a MYSQL database. I finally managed to insert data to a MySql database using hibernate, with the help of google. but, i couldn't find any helpful article on google, on retrieving data, will some plzz help me, by directing me to a site that has sample codes ??
    i am actually new to MYSql and Databases in java, so plzz do help me, i am lost here,,, :(

    Oh, it's Hibernate. In the future, please use the forums at their own site.
    Answers on how to use Hibernate are usually available in the excellent "Hibernate Reference Documentation" available here.

  • Java Webstart Database applications

    Hello all
    Is it possible to write a webstart application that downloads to a remote client and accesses a database on a server via an internet connection? Would the client need JDBC drivers installed? Can these be packaged in the webstart application download? What are the security issues involved?
    If anyone could point me to a good website about this then that would be great!
    Chris

    Most of database does not let you accessing them by a computer other than localhost.
    We are using Servlet to extract the necessary information from the database and to send it (zipped) to the Java Web Start client. The network communication is then very limited.
    That is probably the more efficient and reliable than to access the db directly by the client.
    Regards,
    Benoit

  • Need help with Java, have a few questions about my Applet

    Purpose of the program: To create a mortgage calculator that will allow the user to input the loan principal then select 1 of 3 choices from a combo-box (7 years @ 5.35%, 15 years @ 5.50%, 30 years @ 5.75%).
    Problem: My program was working properly (so I thought). I can get the program to properly compile and run through TextPad. However, I noticed that when the user clicks the calculate more than once (with the same input), it slightly alters the output calculations. So that is my first question, Why is it doing that?  How can I get it only calculate that information once unless the user changes it etc?
    My next question is regarding my exit button. I was told by my instructor (who has already stated he won't help any of us) that my exit button does not work for an applet and only for an application. So, how can I create an exit button that will work with an applet? I thought I did it right but I can't find any resources online for this.
    Next question, why isn't my program properly validating invalid input? My program should only allow numeric input and nothing more.
    And last question, when invalid input is entered and the user clicks calculate, why isn't my JOptionPane window for error messages not displaying?
    I know my code is a little long so I have to post this in two messages. Please don't criticize me for what I am doing, that is why I am learning and have come to this forum for help. Thanks
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    import java.text.NumberFormat;
    import java.text.DecimalFormat;
    // Creating the main class
    public class test extends JApplet implements ActionListener
         // Defining of format information
         JLabel heading = new JLabel("McBride Financial Services Mortgage Calculator");
         Font newFontOne = new Font("TimesRoman", Font.BOLD, 20);
         Font newFontTwo = new Font("TimesRoman", Font.ITALIC, 16);
         Font newFontThree = new Font("TimesRoman", Font.BOLD, 16);
         Font newFontFour = new Font("TimesRoman", Font.BOLD, 14);
         JButton calculate = new JButton("Calculate");
         JButton exitButton = new JButton("Quit");
         JButton clearButton = new JButton("Clear");
         JLabel instructions = new JLabel("Please Enter the Principal Amount Below");
         JLabel instructions2 = new JLabel("and Select a Loan Type from the Menu");
         // Declaration of variables
         private double principalAmount;
         private JLabel principalLabel = new JLabel("Principal Amount");
         private NumberFormat principalFormat;
         private JTextField enterPrincipal = new JTextField(10);
         private double finalPayment;
         private JLabel monthlyPaymentLabel = new JLabel("  Monthly Payment    \t         Interest Paid    \t \t            Loan Balance");
         private NumberFormat finalPaymentFormat;
         private JTextField displayMonthlyPayment = new JTextField(10);
         private JTextField displayInterestPaid = new JTextField(10);
         private JTextField displayBalance = new JTextField(10);
         // Creation of the String of arrays for the ComboBox
         String [] list = {"7 Years @ 5.35%", "15 Years @ 5.50%", "30 Years @ 5.75%"};
         JComboBox selections = new JComboBox(list);
         // Creation of the textArea that will display the output
         private TextArea txtArea = new TextArea(5, 10);
         StringBuffer buff = null;
              Edited by: LoveMyAJ on Jan 19, 2009 1:49 AM

    // Initializing the interface
         public void init()
              // Creation of the panel design and fonts
              JPanel upper = new JPanel(new BorderLayout());
              JPanel middle = new JPanel(new BorderLayout());
              JPanel lower = new JPanel(new BorderLayout());
              JPanel areaOne = new JPanel(new BorderLayout());
              JPanel areaTwo = new JPanel(new BorderLayout());
              JPanel areaThree = new JPanel(new BorderLayout());
              JPanel areaFour = new JPanel(new BorderLayout());
              JPanel areaFive = new JPanel(new BorderLayout());
              JPanel areaSix = new JPanel(new BorderLayout());
              Container con = getContentPane();
              getContentPane().add(upper, BorderLayout.NORTH);
              getContentPane().add(middle, BorderLayout.CENTER);
              getContentPane().add(lower, BorderLayout.SOUTH);
              upper.add(areaOne, BorderLayout.NORTH);
              middle.add(areaTwo, BorderLayout.NORTH);
              middle.add(areaThree, BorderLayout.CENTER);
              middle.add(areaFour, BorderLayout.SOUTH);
              lower.add(areaFive, BorderLayout.NORTH);
              lower.add(areaSix, BorderLayout.SOUTH);
              heading.setFont(newFontOne);
              instructions.setFont(newFontTwo);
              instructions2.setFont(newFontTwo);
              principalLabel.setFont(newFontThree);
              monthlyPaymentLabel.setFont(newFontFour);
              displayInterestPaid.setFont(newFontFour);
              displayBalance.setFont(newFontFour);
              areaOne.add(heading, BorderLayout.NORTH);
              areaOne.add(instructions, BorderLayout.CENTER);
              areaOne.add(instructions2, BorderLayout.SOUTH);
              areaTwo.add(principalLabel, BorderLayout.WEST);
              areaTwo.add(enterPrincipal, BorderLayout.EAST);
              areaThree.add(selections, BorderLayout.NORTH);
              areaFour.add(calculate, BorderLayout.CENTER);
              areaFour.add(exitButton, BorderLayout.EAST);
              areaFour.add(clearButton, BorderLayout.WEST);
              areaFive.add(monthlyPaymentLabel, BorderLayout.CENTER);
              areaSix.add(txtArea, BorderLayout.CENTER);
              // Using the ActionListener to determine when each button is clicked
              calculate.addActionListener(this);
              exitButton.addActionListener(this);
              clearButton.addActionListener(this);
              enterPrincipal.requestFocus();
              selections.addActionListener(this);
         // The method that will perform specific actions defined below
         public void actionPerformed(ActionEvent e)
              Object source = e.getSource();
              buff = new StringBuffer();
              // Outcome of pressing the calculate button
              if (source == calculate)
                   // Used to call upon the user chosen selection
                   int selection = selections.getSelectedIndex();
                   // If statement to call upon Loan One's Method
                   if (selection == 0)
                        Double data = (Double)calculateLoanOne();
                        String sourceInput = data.toString();
                        displayMonthlyPayment.setText(sourceInput);
                        txtArea.setText(buff.toString());
                   // If statement to call upon Loan Two's Method
                   else if (selection == 1)
                        Double data = (Double)calculateLoanTwo();
                        String sourceInput = data.toString();
                        displayMonthlyPayment.setText(sourceInput);
                        txtArea.setText(buff.toString());
                   // If statement to call upon Loan Three's Method
                   else if (selection == 2)
                        Double data = (Double)calculateLoanThree();
                        String sourceInput = data.toString();
                        displayMonthlyPayment.setText(sourceInput);
                        txtArea.setText(buff.toString());
                   // Outcome of pressing the clear button
                   else if (source == clearButton)
                        enterPrincipal.setText("");
                        displayMonthlyPayment.setText("");
                        selections.setSelectedIndex(0);
                        txtArea.setText("");
                   // Outcome of pressing the quit button
                   else if (source == exitButton)
                        System.exit(1);
         // Method used to validate user input
         private static boolean validate(JTextField in)
              String inText = in.getText();
              char[] charInput = inText.toCharArray();
              for(int i = 0; i < charInput.length; i++)
                   int asciiVal = (int)charInput;
              if((asciiVal >= 48 && asciiVal <= 57) || asciiVal == 46)
              else
                   JOptionPane.showMessageDialog(null, "Invalid Character, Please Use Numeric Values Only");
                   return false;
                   return true;

  • MySQL Database Structure Question

    This is probably going to seem a little odd, but I need some outside opinions.  I'm using Dreamweaver CS5 to build a business website.  When all is said and done, it's going to have around 20,000 items (not anytime soon, but it'll get there).  I'm using a dynamic data set up to load the inventory because I'm way too lazy to build that many pages and links one at a time.
    The corporate chain has two sections, lighting, and electrical supply.  I want the database to hold the product ID(of course), name, description, image(this is part of where the question comes in), price, sale price(discounts not our cost), an enum field for whether or not the item is discontinued(for our own records), size / weight for shipping reasons, and if reality is permitting, a field for color selection of the products.
    My original idea was to have two tables, one for lighting, one for electrical.  Somebody pointed out to me that this could fail because they pointed out that some of the items might have multiple images, which is true.  Some of the items (like some of the fans we sell) have different colors but still cost the same.  They suggested I set the images up in a seperate table and use a foreign key. but that changes my entire structure.
    Does anyone mind offering ideas on how I might set that up to avoid data redundancy and other problems that might pop up due to repeat listings?  I've got the images all with unique names (in the case of the same product in different colors, I added a color code like pb for polished brass, etc.)  That person had an excellent point on multiple tables, so now I'm wondering about a better and more reliable structure.

    I'm ok with PHP, and usually pretty good with databases.  Right now I've got enough sample stuff to build a smaller scale prototype with about 200 products, from both lighting and electric.  Believe me, I haven't really done much more than start with the layout, because the many to many relationships just didn't occur to me.  Pretty much going solo on this project with occasional advice from one co-worker who's good at his job but extremely busy, so I think I just got a little to close to it and overlooked some clear and obvious problems.  As far as requirements, I'm using a 3 column div tag layout, the left column being the nav bar with the product categories.  When they click one of those, it should display that category (image, name, price) with the clickable name and thumbnail image in the middle, and from there they click the product they want to see and it'll display the full size image and full description on the right column.
    Set requirements...wish I had a clear list, but the bosses are pretty much illiterate in this area of computers, so I'm on my own with that.  That's all I'm hoping to get out of the database is that three column layout.  I figure I'll make a changeable nav bar later so customers can switch from one store to the other and the nav bar goes from there.
    We're hoping to get the database to have the fields I mentioned for now (at least for initial testing) and maybe add an inventory tracking function so we know how many we have throughout the chain.  We're not worried about that part now, just getting them up and selling cuz our current inventory system works just fine.  How would 10 or more tables be better?  Just breaking down the amount of products to be searched at a time, or is that how detailed you think it should be built?  Don't worry, I wasn't hanging everything on a two table set up, I knew there would be room for much improvement.
    Current basic layout:
    Lighting / Electric Tables          Image table:  ID (either the product ID without the color code or maybe the document path), category(lighting / electric),                                                                   subcategory (fan, lamp, etc)
    id
    class
    category
    description
    price
    sale price
    discontinued
    size
    weight
    That's what I've got so far, sorry for the weird way that list pasted....

  • A simple jsp with database application

    I want to develop a web site using java + sql server,
    Ithe site is very simple and contain only few tables
    Where can I find a good example for such an application ???

    Java pet store demo maybe too complex for you, Personally I would just write the simple application what do you want examples of?

  • Database design question about historical data in a group of tables

    Hi Folks,
    I have a group of tables having relationships among them. In order to keep the change history, we can not update the data, instead, we add new data to the table(s) and mark older data as whatever non-current status. They all have timestamps in these tables.
    For example, If table Parent changes, we add new record Parent(new) and keep older record(s). But the table child has not changed, so how could we link the parent and child table(s)?
    One solution is to use a unique sequencial number to identify the snapshot of all these group of tables, so the FK contains this sequencial number to keep all tables in sync from point of time t1 to t2 and so on.
    But the problem is if only one table changes, we have to insert new records to ALL tables with the new sequencial number to indicate a new snapshot of all group of tables, this obviously has lots of redundancy when change occurs in one place only.
    However, If we only adds new records to a changed table, lets say Parent, how could we distinguish the current record in Parent table and its child tables to reflect a consistent snapshot of all tables? Because the record in parent table Parent(t2), Parent(t1) all associate to child(t1), since at time of t2, child table has not changed, only Parent table changed.
    Your opinions are appreciated!
    Thanks a lot.

    There are books on the subject of dealing with time series data. You may need to read one or two as this is a very complex topic. Though not applications of time series classification are complex it is difficult to tell based on what information can go in a post.
    What has to be reflected on the parent when a child row is changed? Do both the old child row and the new child row belong to the same parent?
    What activity at the parent level would affect the child rows? That is, is there any activty on the parent that requires new child rows to be populated?
    One way of tying the child rows to a specific set of parents would be to carry the parent key, timestamp to the child as a begin_parent_timestamp and then also potentially have a end timestamp if a change to a parent ends the relationship. If changes to the parent do not ever end the relationsip then the end_timestamp would not be necessary. In this case if you want to join a parent to only the most recent version of a child you can perform a select parent kye, child key, max(parent_timestamp) from child group by parent key, child key. One child row would match serveral parents.
    Without more specifics it is hard to make suggestions that might prove usable but your table relationships might be too complex to deal with in this kind of forum.
    There is a newsgroup on database theory that may be a good place to seek ideas on this type of problem.
    HTH -- Mark D Powell --

  • Very simple Java AWT Frame resize question

    In the following code, I create an awt Frame. Unfortunately, when I run the resulting Java application (on Windows) and use the mouse to resize the window, none of the Frame's resize/setSize methods get called. Can anyone explain why this is?
    Thanks
    Greg
    import java.awt.* ;
    public class Junk extends Frame {
    public static void main (String args[])
    Junk j = new Junk ();
    j.show ();
    public void resize(Dimension arg0)
    super.resize(arg0);
    public void resize(int arg0, int arg1)
    super.resize(arg0, arg1);
    public void setSize(Dimension arg0)
    super.setSize(arg0);
    public void setSize(int arg0, int arg1)
    super.setSize(arg0, arg1);
    }

    When the user resizes the frame with the mouse, the resizing action probably happens entirely on the Frame's peer, without the java.awt.Frame getting involved at all. setSize() and [deprecated] resize() allow an application to programmatically change the size of a Frame, but the Frame just passes the new size to its peer.
    If you want to detect when your Frame has been resized, use addComponentListener to register a component listener on the Frame, and then put your code in the componentResized method of the listener.

  • List of Simple and Yes or No questions about the Precision T7910 Workstation

    1) I bought a T7910 with only 1 Processor, can I add a second Processor later? 
    2) Do all 7910 Models come with a dual-processor motherboard?
    3) There are videos on Youtube showing a guy changing his 5.25" HDD ports into 2.5" SSD ports with cables, screws, metal plates, and these great little fans and such,  but there seems to be no way to find out where he got the cables, screws and little fans, Do these sort of options, cables, screws, plates and fans etc. come with the T7910?
    4) If they do not come with the machine, can they be ordered after the fact? (where? See next question...)
    5)  I went to the Dell Parts & Upgrades site then to the 'Accessories for your Dell Precision Workstations T7910' page,.  There was exactly ONE part available for the 7910, (some strange cheap little video card) see here: accessories.us.dell.com/.../Category.aspx;l=en&cs=19&s=dhs&category_id=2999&mfgpid=238987&Tab=Parts&stype=2
    so.... 
    Is that the ONLY Part or Upgrade one can buy for a Precision 7910 workstation?
    (sub question: Where are the Replacement Power supplies and Memory chips and cables and fans and Procs and Drives and Raid Kits for the 7910?
    6)  I bought 32GB DDR4-2133 for my 7910 (in a 4x8GB configuration), can I ADD more memory later keeping my existing chips and just adding 4 more 8GB chips to get to 64GB? (or do they all have to be matched chips installed at the same time like the old days...)
    THANK YOU!

    I just bought my T7910. The short list of specs on mine:
    - E5-2623
    - 2 x 4GB (2 x 16GB should be coming in this week)
    - 310 videocard (already been upgraded to a 960)
    - 500GB HDD (already added a 500GB Samsung 850 EVO and a leftover 2TB)
    - purchased the quad 2.5" drive bay that goes into the 5.25" optical drive bay to allow me to put in 4 x 2.5" drives besides the standard 4 x 3.5" drives
    I bought this system after very detailed research. Not all information and/or parts are straight up available on Dell's site (e.g. the quad drive bay I made sure to be part of the purchase, but knew it would ship separately).
    SpeedStep
     1) I bought a T7910 with only 1 Processor, can I add a second Processor later? 
    No -> Incorrect: you can add a 2nd processor later, but you'd need to get a genuine Dell heatsink for that 2nd processor, which currently means you'll have to buy that from Dell as I haven't found any resellers offering that heatsink separately yet.
    2) Do all 7910 Models come with a dual-processor motherboard?
    No -> Yes, all motherboards in the T7910 support dual processors (you just need a 2nd heatsink, which doesn't come with the system if you buy it with a single processor)
    3) There are videos on Youtube showing a guy changing his 5.25" HDD ports into 2.5" SSD ports with cables, screws, metal plates, and these great little fans and such,  but there seems to be no way to find out where he got the cables, screws and little fans, Do these sort of options, cables, screws, plates and fans etc. come with the T7910?
    No -> Correct, but you can buy them from Dell. The SKU to buy is 470-ABHF. This SKU is probably not findable on dell.com, so you'd have to go through spare parts or your salesrep. Dell's KB article here, shows some information, but at the time I'm writing this it doesn't have a (correct) SKU for the 7910 (it uses different cables than the 7600/7610 due to the 12Gbit/s SAS vs 6Gbit/s SAS).
    4) If they do not come with the machine, can they be ordered after the fact? (where? See next question...)
    No -> Yes, see above
    5)  I went to the Dell Parts & Upgrades site then to the 'Accessories for your Dell Precision Workstations T7910' page,.  There was exactly ONE part available for the 7910, (some strange cheap little video card) see here: accessories.us.dell.com/.../Category.aspx;l=en&cs=19&s=dhs&category_id=2999&mfgpid=238987&Tab=Parts&stype=2
    so.... 
    Is that the ONLY Part or Upgrade one can buy for a Precision 7910 workstation?
    Yes -> No, the website is just very limited in what it lists, even though Dell does seem to have added memory and drive upgrades at least, since your original post.
    (sub question: Where are the Replacement Power supplies and Memory chips and cables and fans and Procs and Drives and Raid Kits for the 7910?
    No -> You'll have to call Dell spare parts or your Dell salesrep.
    6)  I bought 32GB DDR4-2133 for my 7910 (in a 4x8GB configuration), can I ADD more memory later keeping my existing chips and just adding 4 more 8GB chips to get to 64GB? (or do they all have to be matched chips installed at the same time like the old days...)
    Yes -> Correct; each processor has 4 memory channels. All usable memory channels have to be identically populated, unless the memory channel isn't being used (e.g. you don't have a 2nd processor to communicate with the 2nd set of 8 DIMMslots, or you don't need that much memory at this time). So, in your case, you would end up with 4 memory channels with 2 x 8GB DIMMs in each memory channel. For my system I should have 4GB + 16GB in 2 of my 4 memory channels for my CPU.

  • MySQL database relation question

    I'm setting up a site where registered users can catalog
    their Japanese Vinyl toys (i.e. vinyl kaiju). I have 2 tables:
    collection
    members
    members has an ID that is specific to each member
    (naturally). within collection I have kaijuID and userID.
    What I need to figure out is the best way to get the ID from
    the member table to populate within the collection table, thus
    allowing each registered user to see just their collection.
    I can wrap my head around displaying the collection based on
    the user ID -- I just can't figure out where to add the user ID
    information into the collection database.
    The site structure has:
    login page
    member home page
    add kaiju
    view kaiju
    update kaiju
    search kaiju
    the add / view / update / search pages will all utilize the
    ID's. Not a big deal since I can have the user ID as a base for the
    results on these pages. it's the adding a new kaiju part that I
    can't figure out. Where would this form associate the logged in
    user so that it silently adds in their ID along with the toy info?
    A hidden field would be a natural assumption -- would that be part
    of the submit action?
    So basically here's the breakdown:
    User A has an ID of 001
    User A wants to catalog 2 kaiju: Godzilla and Gamera
    When User A submits these two each will need to have the 001
    user ID added to the collection table column labeled as userID
    (which is the same as the column in the member table).
    Which will allow the viewed collection to specifically show
    just member 001's collection.
    phew. Any suggestions would be appreciated. I looked through
    the CS3 documentation and got this far but didn't see anything for
    relational databases.
    Thanks!

    tried doing that and it wasn't working. When I had added the
    binding the vinyl I had added in as a test wouldn't display.
    What would be ideal is the following:
    all new users are assigned a userID in the MEMBERS table.
    this is an auto-incrementing (primary key) value that is unique to
    each user.
    in the COLLECTIONS table there's a column called userID. when
    a user is logged in, then any new addition to the COLLECTIONS table
    will add in their userID on the backend so that each user's entries
    are tied in to their userID.
    I first tried adding in the session_start code on all pages
    and then the filter to the recordset. rather than using filter:
    user_name I went with filter: userID. That didn't do anything but
    killed the display of any new additions to the view page.
    I then tried setting up a binding to a hidden field in the
    add form:
    <input name="userID" type="hidden" value="<?php echo
    $_SESSION['userID']; ?>" />
    which might have been successful, although I got a message
    saying that userID cannot be null, so when I switched it to NULL
    the entry didn't register anything in the COLLECTION --> userID
    column but a NULL.
    Would part of the problem be that userID in the MEMBERS table
    is the key? I already have a column in MEMBERS that is usrname --
    which would be easy to change in COLLECTIONS (from userID to
    usrname) although I wasn't sure if that would do anything either
    way.
    Also, since the session isn't labeled, such as
    <?php echo $_SESSION['userID']; ?>
    then how, based on your helpful suggestion, will the pages
    know the specific session ID?
    so close....

  • Question about triggering events

    Hi SAP Experts,
    Is it possible to call a workflow from a program. Everytime I complete the processes in my program, a workflow should be triggered. Thanks in advance!

    You can trigger workflow using the below FM's which can be used in your program...
    SAP_WAPI_CREATE_EVENT
    SAP_EVENT_CREATE
    SWW_WI_START

  • How to load a java class when application is at first time browsed.

    Hi
    How can i load a simple java class on application startup.
    For servlet it could be done using "load on startup" tag in web.xml
    but how could the same be achieved for a simple java class.
    Thanks

    Hi
    Code is given below....
    package com;
    import java.io.IOException;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class Test {
    Test()
         HttpServletRequest request=null;
         HttpServletResponse response=null;
         RequestDispatcher requestDispatcher = request.getRequestDispatcher("a.jsp");
         try {
              requestDispatcher.forward(request,response);
         } catch (ServletException e) {
              System.out.println("success");
              e.printStackTrace();
         } catch (IOException e) {
              System.out.println("success 1");
              e.printStackTrace();
         finally
              System.out.println("success 2");
         System.out.println("success 3");
    }Web.xml :
    <servlet>
            <servlet-name>simple</servlet-name>
            <servlet-class>com.Test</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
      <servlet-mapping>
          <servlet-name>simple</servlet-name>
          <url-pattern>/init.do</url-pattern>
        </servlet-mapping>Error Trace :
    org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /DispatcherTest threw load() exception
    java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class com.Test with modifiers ""
         at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
         at java.lang.Class.newInstance0(Class.java:344)
         at java.lang.Class.newInstance(Class.java:303)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
         at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1069)
         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1162)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1304)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
         at java.lang.Thread.run(Thread.java:595)

  • Web database application design examples wanted

    Hi! I�ve written a couple of smaller web database applications in Java but I�m not completely satisfied with my design, especially where and how to put the database code. Now I�m looking for small open source examples of good design of web database applications in Java. I would appreciate if you could direct me to a good example application, preferably easy to understand. Also feel free to mention any other resource that you think I should look at. At the moment I don�t have the time to read a complete book but I plan to do this later � so book recommendations for professional Java developer are also very welcome.
    Summary of recommendations I would like to get:
    1) Java web database application with good design
    2) Design book for professional Java developers
    3) Any other design related resource
    Thanks!

    http://www.springframework.org/docs/MVC-step-by-step/Spring-MVC-step-by-step.html

Maybe you are looking for