Solved

I want to get 16 digit number from Oracle but I get error

Posted on 2006-06-22
64
348 Views
Last Modified: 2008-01-09
I am using tomcat/JDBC to access Oracle.  

public int getNumber()
        throws MyException
    {
        Connection connection = null;
        MyException exception = null;
        Statement statement = null;
        ResultSet rs = null;
        long CustNum = 0;
       
        try
        {
            connection = DBConnection.getConnection();
            statement = connection.createStatement();
            String CardNum = "select CustID from evisa where ACCOUNT=208487";
                  rs = statement.executeQuery(CardNum);
            if(rs.next())
            {
               CustNum = rs.getLong("CustID");
                System.out.println(CustNum);
            }
            }
        catch(SQLException sqle)
        {
            exception = new MyException(HBError.get("DatabaseFailure.exCode"), HBError.get("DatabaseFailure.exDescription"), HBError.get("DatabaseFailure.exRecovery"), sqle);
        }
        finally
        {
            DBConnection.freeConnection(connection, statement, null);
            if(exception != null)
                throw exception;
        }
      return CustNum;
    }

I am getting error:
java.sql.SQLException: Numeric Overflow

becuase the CustID  is long number (16 digits) and.  I chnage my test account to be # 10 then my code worked.  I know my problem is the lrage number.
I tried to make int to Long  I get an error:

found   : long
required: int
        return CustNum;
               ^
1 error

how can I solve this problem

thanks
0
Comment
Question by:salasadi
  • 28
  • 19
  • 6
  • +2
64 Comments
 
LVL 92

Expert Comment

by:objects
Comment Utility
>      return CustNum;

try:

     return (int) CustNum;
0
 

Author Comment

by:salasadi
Comment Utility
so leave everything as is but change this line or make the variable as long in my decalration?
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Try


BigDecimal CustNum = rs.getBigDecimal("CustID");
0
 

Author Comment

by:salasadi
Comment Utility
now I am getting this:

found   : java.math.BigDecimal
required: int
        return CCustNum;

Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Well, obviously you'd have to *return* BigInteger instead
0
 

Author Comment

by:salasadi
Comment Utility
when I did that I get the following:

found   : java.math.BigDecimal
required: java.math.BigInteger
        return  (BigInteger) CustNum;
                             ^
when I remove the ()

I get the following:

C:\com\test\getNumber.java:51: ';' expected
        return  BigInteger CardAcctNum;

0
 

Author Comment

by:salasadi
Comment Utility
woops
it retruns  return  BigInteger CustNum; sorry for the typo
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
> public int getNumber()

change that to

public BigInteger getNumber()
0
 

Author Comment

by:salasadi
Comment Utility
I did that but still
0
 

Author Comment

by:salasadi
Comment Utility
now I am getting this error:

C:\com\test\getNumber.java:52: inconvertible types
found   : java.math.BigDecimal
required: java.math.BigInteger
        return  (BigInteger) CustNum;
                             ^
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Don't forget

BigInteger CustNum = null;

as well
0
 

Author Comment

by:salasadi
Comment Utility
some it compliants about coverting the variable! even after I intil the BigInteger CustNum = null;
C:\com\test\getNumber.java:52: inconvertible types

Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
There should be no conversion. Get rid of int altogether
0
 
LVL 12

Expert Comment

by:Giant2
Comment Utility
Try to cast to int:
public int getNumber(){
...
return CustNum.intValue();
}

Bye, Giant.
0
 
LVL 12

Expert Comment

by:Giant2
Comment Utility
if you need you can even use:
CustNum.floatValue()
or
CustNum.longValue()
...
See http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html
0
 

Author Comment

by:salasadi
Comment Utility
Giant,
Thanks the casting did it.  I still have 1 problem.  some time CustNum retrun more then one value, and I need to pass the values to JSP page:

 Myclass test  = new myclass();

String CustNum = String.valueOf(test.getCustNumber());

husband and wife can both have the same account but diffrent Custnum, I need to get both custnum and give them the option to select which account to view.

Thanks again
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>Thanks the casting did it.

How are you casting? int cannot hold the maximum 16 digit number

int i = 9999999999999999; // Won't compile
0
 

Author Comment

by:salasadi
Comment Utility
I left the BigDecimal when I get the rs:

CustNum = rs.getBigDecimal("CustNum");

I cheange the retrun value to :

return  CustNum.intValue();


the output:
5194820009999090
0
 
LVL 12

Expert Comment

by:Giant2
Comment Utility
You must change this piece of code:
  if(rs.next())
            {
               CustNum = rs.getLong("CustID");
                System.out.println(CustNum);
            }
            }

make a while cycle. In this manner you read all the record from your ResultSet.
After this the return variable of your method must be an array or a collection (Vector).
0
 

Author Comment

by:salasadi
Comment Utility
can you give anexample please.  I still have a hard time to understand OO
0
 
LVL 12

Expert Comment

by:Giant2
Comment Utility
Example:
public Vector getNumber(){
Vector ret=new Vector();
...
while (rs.next()){
CustNum=rs.getBigDecimal("CustNum");
System.out.println(CustNum);
ret.addElement(CustNum);
}
return ret;
}

Be sure that when you call this method you must cast correctly the element of the Vector.
Example:
Vector numbers=getNumber();
int value0=((BigDecimal)numbers.elementAt(0)).intValue;
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>
I cheange the retrun value to :

return  CustNum.intValue();
>>


But you can't do that - that number will not fit in an int. See the following:

                  BigInteger bi = new BigInteger("5194820009999090");
                  System.out.println(bi.intValue());
                  System.out.println(bi);
0
 
LVL 12

Expert Comment

by:Giant2
Comment Utility
Or, example 2:
public int[] getNumber(){
Vector ret=new Vector();
..
while (rs.next()){
CustNum=rs.getBigDecimal("CustNum");
System.out.println(CustNum);
ret.addElement(CustNum);
}
int[] retint=int[ret.size()];
for (int i=0;i<ret.size();i++){
retint[i]=((BigDecimal)ret.elementAt(i)).intValue();
}
return retint;
}

In this manner you can manage the int value "directly".
int[] values=getNumber();

Is it clear now?
Hope this could help you.
Bye, Giant.
0
 

Author Comment

by:salasadi
Comment Utility
C:\com\test\getnumber.java:15: illegal start of expression
         public int[] getNumber()
         ^
0
 
LVL 12

Expert Comment

by:Giant2
Comment Utility
check the { } parentesis. Maybe someone is not closed.
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
It would be more helpful if you post your entire code.

>> illegal start of expression

You have probably written that outside a class or inside a method.
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>retint[i]=((BigDecimal)ret.elementAt(i)).intValue();

You *can't* do that, for the reason i stated
0
 

Author Comment

by:salasadi
Comment Utility
public class getNumber
{

    public getNumber()
    {
       public int[] getNumber()
             {
            Vector ret=new Vector();
        throws MyException
            {
                  Connection connection = null;
                  MyException exception = null;
                  Statement statement = null;
                  ResultSet rs = null;
                  BigDecimal CardAcctNum= null;        
        try
        {
            connection = DBConnection.getConnection();
            statement = connection.createStatement();
            String CardNum = "select Custnum from evisa where ACCOUNT=208487";
                  rs = statement.executeQuery(CardNum);
                  while (rs.next())
                        {
                        CardAcctNum=rs.getBigDecimal("Custnum");
                        System.out.println(CardAcctNum);
                        ret.addElement(CardAcctNum);
                        }
         catch(SQLException sqle)
        {
            exception = new MyException(HBError.get("DatabaseFailure.exCode"), HBError.get("DatabaseFailure.exDescription"), HBError.get("DatabaseFailure.exRecovery"), sqle);
        }
        finally
        {
            DBConnection.freeConnection(connection, statement, null);
            if(exception != null)
                throw exception;
        }
      return ret;
      }
  }
}
0
 

Author Comment

by:salasadi
Comment Utility
sorry guys, here is the correct code:

public class getNumber
{

    public getNumber()
    {
       public int[] getCustnum()
             {
            Vector ret=new Vector();
        throws MyException
            {
                  Connection connection = null;
                  MyException exception = null;
                  Statement statement = null;
                  ResultSet rs = null;
                  BigDecimal CardAcctNum= null;        
        try
        {
            connection = DBConnection.getConnection();
            statement = connection.createStatement();
            String CardNum = "select Custnum from evisa where ACCOUNT=208487";
                  rs = statement.executeQuery(CardNum);
                  while (rs.next())
                        {
                        CardAcctNum=rs.getBigDecimal("Custnum");
                        System.out.println(CardAcctNum);
                        ret.addElement(CardAcctNum);
                        }
         catch(SQLException sqle)
        {
            exception = new MyException(HBError.get("DatabaseFailure.exCode"), HBError.get("DatabaseFailure.exDescription"), HBError.get("DatabaseFailure.exRecovery"), sqle);
        }
        finally
        {
            DBConnection.freeConnection(connection, statement, null);
            if(exception != null)
                throw exception;
        }
      return ret;
      }
  }
}
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
You need to declare your method as

public Vector getNumber()
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
>> public getNumber()
>>     {
>>       public int[] getCustnum()
>>           {

You cannot have a method inside a method like I said earlier. Perhaps just remove the public int[] getCustnum () and { after it, and also one } in the end. Plus make your method public getNumber () as public Vector getNumber ()
0
 

Author Comment

by:salasadi
Comment Utility
I am getting the following error:

C:\com\test\getNumber.java:15: illegal start of expression
        throws MyException
        ^

here is my final version of the class

public class getNumber
{
           public Vector getCustNumber()
      {
            Vector ret=new Vector();
        throws MyException
            {
                  Connection connection = null;
                  MyException exception = null;
                  Statement statement = null;
                  ResultSet rs = null;
                  BigDecimal CardAcctNum= null;        
        try
        {
            connection = DBConnection.getConnection();
            statement = connection.createStatement();
            String CustNum = "select Custnum from evisa where ACCOUNT=208487";
                  rs = statement.executeQuery(CustNum);
                  while (rs.next())
                        {
                        CustNum=rs.getBigDecimal("Custnum");
                        System.out.println(CustNum);
                        ret.addElement(CustNum);
                        }
            }
         catch(SQLException sqle)
        {
            exception = new MyException(HBError.get("DatabaseFailure.exCode"), HBError.get("DatabaseFailure.exDescription"), HBError.get("DatabaseFailure.exRecovery"), sqle);
        }
        finally
        {
            DBConnection.freeConnection(connection, statement, null);
            if(exception != null)
                throw exception;
        }
            }
      return ret;
      }
}
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>throws MyException

should come directly after

>>public Vector getCustNumber()
0
 

Author Comment

by:salasadi
Comment Utility
you mean it should look like this:

public Vector getCustNumber()
        Vector ret=new Vector();
        throws MyException
         {
          {
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
public Vector getCustNumber() throws MyException
0
 

Author Comment

by:salasadi
Comment Utility
yaeeeeeeeeeee, the class is compiled successfully and ready to be test it. thank you guys for your help.

how can call vector from JSP?

before the vector I have the following:

Myclass test  = new myclass();
String CustNum = String.valueOf(test.getCustNumber());

now I changed this to be:

static Vector keyw = new Vector(number);

0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
In your JSP you need to do

<%
    Vector v = new getNumber().getCustNumber();
    // Now use it
%>

Incidentally, class names should begin with a capital letter or your code gets hard to read
0
 

Author Comment

by:salasadi
Comment Utility
you mean getNumber should be GetNumber?  This is how I design my code in VB and ASP, someone told me that in Java the standard is to use small letter for the first letter of variable and class, but the second word in the name should be Uppercase.  

0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
No. In Java it is usually uppercase for the first character of a class name.
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>in Java the standard is to use small letter for the first letter of variable and class

Only for variables
0
 

Author Comment

by:salasadi
Comment Utility
I can loop through my record in JSP, however, I want to be able to check each record to identified the CustNum. I catigorized each CustNum as Gold(G), Silver(S). base on the first 6 difit of the Custnum I can detrmine whether this Cust is G or S.  

I tried  to do the following but faild:

int CardAcctNum=(linteger)e.nextElement();

however, in my JSP I am able to display it as <%= e.nextElement()%>.  what is the data type of the e.nextElement()? and how can I assign it variable and check the first 6 digit?

Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
Where is the Enumeration coming from - on what collection is it called and what's in it?
0
 

Author Comment

by:salasadi
Comment Utility
CEHJ,
as you see that I am learning my way to do this.   I find out that I have 2 type custmer, and each have the starting digit diffrent. I tried to do if statement in JSP to detrmine what type of customer. however, the type of custmer is exist in my database and I can pull it in.   so I did add the field the vector.


rs = statement.executeQuery(CustNum);
               while (rs.next())
                    {
                    CustNum=rs.getBigDecimal("Custnum");
                    CType = rs.getString("Type")
           
                    ret.addElement(CustNum);
                    ret.addElement(CType);
                    }

this is working, but is this correct?  when I do v.size() the size show 2 record.  I look at it as 1 record diffrent field but Vector see it as 2 record.

when I retrieve it in JSP I do:

Vector v = new getNumber().getCustNumber();
Enumeration e = v.elements();
while (e.hasMoreElements()) {

%>
<td>Cust Number:</td><td align=left><%= e.nextElement()%></td><td>Type: <%= e.nextElement()%></td>

<%
}
%>

the output is:
Cust Number: 1111111111111112222    Type G

Please let me know if I am doing this correctly.

Thanks

0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
I would use an Iterator. You're right - it's two values in one row. You need


Vector row = new Vector(2);                  
row.addElement(CustNum);
row.addElement(CType);
ret.addElement(row);

0
 

Author Comment

by:salasadi
Comment Utility
and how retrieve it? would that change?
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
You retrieve it thus


Iterator i = ret.iterator();
while (i.hasNext()) {
    Vector row = (Vector)i.next();
    BigInteger custNum = (BigInteger)row.get(0);
    String name = (String)row.get(1);
}
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
You can also loop through:

for ( int i = 0, count = ret.size () ; i < count ; i ++ )
{
  Vector row = ( Vector ) ret.get ( i ) ;
}
0
 

Author Comment

by:salasadi
Comment Utility
CEHJ
I tried to use this:
Vector v = new getNumber().getCustNumber();
Iterator i = ret.iterator();
while (i.hasNext()) {
    Vector row = (Vector)i.next();
    BigInteger custNum = (BigInteger)row.get(0);
    String name = (String)row.get(1);
}

but I am getting error:

Undefined variable or class name: ret
                Iterator i = ret.iterator();
0
 

Author Comment

by:salasadi
Comment Utility
I change the code to be:
Vector v = new getNumber().getCustNumber();
Iterator i = v.iterator();
while (i.hasNext()) {
    Vector row = (Vector)i.next();
    BigInteger CardAcctNum = (BigInteger)row.get(0);
    String name = (String)row.get(1);
.......

I am getting the following error stack..

java.lang.ClassCastException

======================================

Message:
======================================
null

======================================
      
Localized Message:
======================================
null

======================================

Stack Trace:
======================================
java.lang.ClassCastException
      at org.apache.jsp.eVisa$jsp._jspService(eVisa$jsp.java:662)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
      at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
      at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
      at java.lang.Thread.run(Thread.java:534)
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
>>getNumber().getCustNumber()

I thought that returned BigInteger ..?
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
if you are just displaying them then you may not even need to cast:

Vector v = new getNumber().getCustNumber();
Iterator i = v.iterator();
while (i.hasNext()) {
    Vector row = (Vector)i.next();
    Object CardAcctNum = row.get(0);
    Object name = row.get(1);
0
 
LVL 30

Expert Comment

by:mayankeagle
Comment Utility
>> Vector row = (Vector)i.next();

What does i.next () return? A Vector, or something else?
0
 

Author Comment

by:salasadi
Comment Utility
Mayankeagle

it should retrun 2 values, here is the how they have been added to the vector:

row.addElement(AcctNum);
row.addElement(CType);
ret.addElement(row);

0
 

Author Comment

by:salasadi
Comment Utility
CHEJ,
the value retrun from the vector to JSP working just fine with the following:

if you are just displaying them then you may not even need to cast:

Vector v = new getNumber().getCustNumber();
Iterator i = v.iterator();
while (i.hasNext()) {
    Vector row = (Vector)i.next();
    Object CardAcctNum = row.get(0);
    Object name = row.get(1);

But I need to convert them to String and Integer so I can do the following:

1-display the number on my JSP like Credit card like Cust Number: ************44445
2-before displaying them I need to be able to send them include an XML string to be encrypted 3DES.  I don't think I will be able to encrypt object.

Thanks
0
 

Author Comment

by:salasadi
Comment Utility
I was able to convert the name to string but not the CustNum:

BigInteger CustNum = (BigInteger)row.get(0); <-- this is not working
String name = (String)row.get(1); <--- this is working fine
0
 

Author Comment

by:salasadi
Comment Utility
in my class the vector use BigDecimal not bigInteger.  but my problem now is that my vector retruns the first value stored in vector until the loop completed.

the following is print statment while I add to the vector:

while (rs.next())
       {
      CustNum=rs.getBigDecimal("CustNum");
      CType = rs.getString("TYPE");
      row.addElement(CustNum);
      row.addElement(CType);
      ret.addElement(row);
      System.out.println(CustNum);
     }
***********1119
***********2220
***********3331

but in my JSP:

Vector v = new getNumber().getCustNumber();
Iterator i = v.iterator();
while (i.hasNext()) {
    Vector row = (Vector)i.next();
    Object CustNum = row.get(0);
    Object name = row.get(1);
system.out.println(CustNum);
}
that retrun the wrong result:

***********1119
***********1119
***********1119

0
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
Comment Utility
>>
row.addElement(CustNum);
     row.addElement(CType);
>>

You're not *creating* a Vector row in each iteration of the loop. You should be
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
> But I need to convert them to String and Integer so I can do the following:

you can just use the toString() method, no need to cast to do that.

Vector v = new getNumber().getCustNumber();
Iterator i = v.iterator();
while (i.hasNext()) {
    Vector row = (Vector)i.next();
    Object CardAcctNum = row.get(0);
    Object name = row.get(1);


...
out.println("Card#: "+CardAcctNum);
0
 

Author Comment

by:salasadi
Comment Utility
so you want me to do the following:



while (rs.next())
       {
    Vector row=new Vector(2);
     CustNum=rs.getBigDecimal("CustNum");
     CType = rs.getString("TYPE");
     row.addElement(CustNum);
     row.addElement(CType);
     ret.addElement(row);
     System.out.println(CustNum);
     }
0
 

Author Comment

by:salasadi
Comment Utility
Vector ret=new Vector();
while (rs.next())
       {
    Vector row=new Vector(2);
     CustNum=rs.getBigDecimal("CustNum");
     CType = rs.getString("TYPE");
     row.addElement(CustNum);
     row.addElement(CType);
     ret.addElement(row);
     System.out.println(CustNum);
     }

0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
That looks OK
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
you'd be better off using an ArrayList instead of a Vector, it'll give you better performance.
In fact an array would probably be more suitable as you know tyhe required size

List ret=new ArrayList();
while (rs.next())
       {
    Object[] row=new Object[2];
     CustNum=rs.getBigDecimal("CustNum");
     CType = rs.getString("TYPE");
     row[0] = CustNum;
     row[1] CType;
     ret.add(row);
     System.out.println(CustNum);
     }
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
then to read it:

List v = new getNumber().getCustNumber();
Iterator i = v.iterator();
while (i.hasNext()) {
    Object[] row = (Object[])i.next();
    String CardAcctNum = row[0].toString();
    String name = row[1].toString();

0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:-)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now