Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. luckydexte

    Cannot insert 12:00 PM into database

    Problem solved. It was the format mask. SimpleDateFormat("hh:mm:ss"); Needed to be: SimpleDateFormat("HH:mm:ss");
  2. luckydexte

    Cannot insert 12:00 PM into database

    Hello all, I am running into a problem trying to insert 12:00 PM into a DB2 database TIME field. I have a jsp page that has a select box with the values 1:00 to 12:00 and a select box with the values of AM and PM. I am using SimpleDateFormat and everything works with the exception of 12:00...
  3. luckydexte

    Checking for null objects

    Sorry everyone, had to go out of town on what could be called a family emergency. The code does declare rc as a RoadCond object - I just shorthanded the code and should not have done that. So the code does go as follows: RoadCond rc = new RoadCond(); rc.getUniqueQuery(value); // Assume 1234...
  4. luckydexte

    Checking for null objects

    I tried that as well but it still throws a null pointer exception. Maybe there is no way around using a try/catch block but if someone knows of one please let me know. Thanks for the help. Brandon
  5. luckydexte

    Checking for null objects

    Hello everyone, Do you have to use a try/catch block to check for a null object? I know this is a pretty simple question but it has been bothering me for a while. An example: I have a class called RoadCond that is a bean. So the following code throws a Null Pointer Exception if I get a...
  6. luckydexte

    Help with limiting what is being selected from database

    Thanks. That is what I came up with but I still get a row with a null date. The database I am using is terrible so there is really no work around. I talked to the user and got the requirements changed so the date is not a problem. Thanks for looking at it. Cheers, Brandon
  7. luckydexte

    Help with limiting what is being selected from database

    Hello all, I am trying to write a query to select data from a database but do not know how to limit what is being selected. I need to use the SUM function to get the total from all of the records that are returned in the where clause but only want the DATE when records have a TRANS_TYPE of 0...
  8. luckydexte

    Printing multidimensional ArrayList or List

    Hello all, I am stuck on what is probably a simple problem. I have an ArrayList (which could be a List of need be) and am trying to print the values of the list which is multidimensional. Here is a result set: 7425 46 46 21146 25 25 21445 -10 0 I am getting this information from a database...
  9. luckydexte

    Selecting from multiple tables

    I was able to connect to the test database and it worked great. Thanks for your help. Brandon
  10. luckydexte

    Selecting from multiple tables

    Thank you for your help. I cannot try this now because they took our servers down for maintenance. I will run it in the morning and let you know. Again, I really appreciate the help. Thanks, Brandon
  11. luckydexte

    Selecting from multiple tables

    Here is some example data. Let me say that the table design is really, really poor which is why I am having to code around this. A result set from the SQL statement above would be: INDIVIDUAL 2336 -40 -40 0 INDIVIDUAL 7425 46 0 46 INDIVIDUAL 20130 177 177 0 INDIVIDUAL 20342 469.44 469.44 0...
  12. luckydexte

    Selecting from multiple tables

    Hello All, I am not an SQL expert by any means and I am getting stuck when trying to select multiple fields from two different tables. I understand why I am not able to do what I want to do but I am not sure how to get around it. Here is the SQL statement I have working so far: SELECT...
  13. luckydexte

    Converting Long type to Integer

    Hello all, Does anyone know how to convert type of Long to an Integer? Long count = function(); // Returns a long Integer factor = (Integer) count; This obviously does not work but I am not sure how to get around this. Hibernate only returns a type of Long when using an aggregate count...
  14. luckydexte

    Problem using innerHTML

    That worked!! Thank you so much - I hate to admit it but I have been working on this for over an hour. Stupid me did not realize that the string was treating the variable as a string. Thanks again, Brandon
  15. luckydexte

    Problem using innerHTML

    Hello all, I am trying to create a popup div tag on the fly (which is working) but I need to create a list of links and call a javascript function with a parameter. The values I am trying to send in are being sent in as strings and not the variables. Has anyone come across this before? A...
  16. luckydexte

    Java Iterate Problem

    Doh, I got it. It was a hibernate mapping issue with the primary key. Sorry to bother anyone if they looked at this. Thanks, Brandon
  17. luckydexte

    Java Iterate Problem

    One note, the line Iterator i = roadCondList.iterator(); should be Iterator i = roads.iterator();. Bad copy and paste on my part.
  18. luckydexte

    Java Iterate Problem

    Hello all, I am running into a problem that I cannot seem to solve. I have an ArrayList of a object called roads and the iterate function is not working the way it should (or at least the way I think it should). Here is the code: ArrayList roads = new...
  19. luckydexte

    Hibernate Problem using subselect set

    Hello all, I am new to Hibernate and I am getting an error that I cannot seem to resolve. Below is the hbm.xml file, the java class, and a little utility to run the code. I am printing the SQL code and when I run it in SQL plus I get the expected results but it will not load when I call my...
  20. luckydexte

    onmouseover Error

    Dan, that was the problem. I have a field in my form called status and I guess there was a naming conflict. When I use window.status it works fine. Thanks for the help from both of you. I should have seen it but I guess that is what happens when you work with the same code for weeks at a...

Part and Inventory Search

Back
Top