This looks like you are asking some JDBC questions about some specific database, Jim. Sorry to say this if you are not. If so, let me just get you going partly by saying that you probably want to use a PreparedStatement rather than a Statement. Start there? Have you read up on JDBC?
Jack On Sat, 08 Jan 2005 19:25:15 +0000, Jim Douglas <[EMAIL PROTECTED]> wrote: > I have an LogonForm, LogonAction and when a user successfully logs on, I set > Attributes for "userID" and "userName". > > How would be the best way to make this information available to the Web App > regardless of whether I need the data from within a JSP, servlet or class > file(for example, building a dynamic query) > > This is what I was trying to do and raised this issue(I can't get it to > work) > > public class SQL92FormDetailDAO implements FormDetailDAO { > > private Connection connection; > public SQL92FormDetailDAO(Connection connection) { > this.connection = connection; > } > > public List listFormDetail() { > List items = new ArrayList(); > Statement statement =null; > try { > statement = connection.createStatement(); > String userID = session.getAttribute("userID"); > String query = "select name, formdetail from " > + "forms where userID = " + userID; > > Thanks, > Jim > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- ------------------------------ "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ "You can't wake a person who is pretending to be asleep." ~Native Proverb~ "Each man is good in His sight. It is not necessary for eagles to be crows." ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ ----------------------------------------------- "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]