Reputation: 95
I would appreciate any help I can get in terms of this topic. In this code:
else if (SQL_error.getErrorCode() == 04088)
{
JOptionPane.showMessageDialog(null, "Error during execution of trigger. Contact administrator. The data logic is faulty. Please recheck logic.", "Error Message", JOptionPane.ERROR_MESSAGE);
//System.out.println("The data logic is faulty. Please recheck logic.");
}
I keep on getting an error message when I hover over 04088. It says: "Number format error." Does anyone have any experience with this issue? I only find string to number conversions.
Upvotes: 1
Views: 1556
Reputation: 95
I got the answer. Octals are used for representing file permissions on Unix systems. This is one of the reasons why Java uses octal numbers (apart from getting it derived from C). Now, back to the question, 04088 is an octal number. In order to be able to use it (even hard-coding it in Java did not help), you have to transform it into a floating point number. Therefore, when you use 04088, you have to put it as 04088F.
else if (SQL_error.getErrorCode() == 04088F)
{
System.out.println("" + (String.valueOf(SQL_error.getErrorCode() == 04088F)));
JOptionPane.showMessageDialog(null, "Error during execution of trigger. Contact administrator. The data logic is faulty. Please recheck logic.", "Error Message", JOptionPane.ERROR_MESSAGE);
//System.out.println("The data logic is faulty. Please recheck logic.");
}
Upvotes: 0
Reputation: 82461
Integers starting with 0 and continuing with other digits are interpreted as octal numbers. Since the highest digit in octal numbers is 7
, 04088
is invalid.
Upvotes: 6