Watch, Follow, &
Connect with Us
Public Report
Report From: JBuilder 2007    [ Add a report in this area ]  
Report #:  57885   Status: Reported
Error getting the sequence numbers using Borland API classes from dx.jar
Project:  JBuilder 2007 Build #:  JBuilder 2007
Version:    2007 1.0 Submitted By:   Srinivas Kompalli
Report Type:  Basic functionality failure Date Reported:  2/5/2008 4:00:58 PM
Severity:    Critical / Show Stopper Last Updated:
Platform:    All versions Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description

We are currently working on JBuilder 2007 and using JDatastore7 jar file dx.jar and we are noticing the issues while getting the nextval from the sequence. The method

The nextval is retrieved using the following statement.

BigDecimal seq1 = agreeSeqIDQDS.getBigDecimal("NEXTVAL");

And the query is constructed as follows.

agreeSeqIDQDS.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1,
                                                                              "select  " + state + ".agreement_q.nextval from dual", null, false,
                                                                              Load.UNCACHED));

Where agreeSeqIDQDS is of type com.borland.dx.sql.dataset.QueryDataSet


For e.g:
The database sequence should return 636. In our code, we get the 6.4E2 which seems to be caused by 6.36 rounds up to 6.4
Please provide us the solution so we can get the correct value from the database sequence.
        
Please find attached the dx.jar file which we are using.
Steps to Reproduce:
1. Create a sequence in the database
2. Use com.borland.dx.sql.dataset.QueryDataSet to create query to get the sequence number
For e.g: select nh.argument_q.nextval from dual
3. Call BigDecimal seq1 = agreeSeqIDQDS.getBigDecimal("NEXTVAL");
to get the sequence.
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01