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...
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...
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
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...
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
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...
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...
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
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...
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...
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...
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
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.