Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC: Casting an int array to sql array.

 
Ranch Hand
Posts: 40
Firefox Browser Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Can we cast an int[] to java.sql.Array?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
No. They are not in the same class hierarchy so you can't cast in Java.
 
NitishK Kumar
Ranch Hand
Posts: 40
Firefox Browser Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Sir, I wrote following code:

package jdbc2.array;
import java.sql.*;

It compiled successfully but when I executed it, I got the error as follows:

Exception in thread "main" java.lang.AbstractMethodError: oracle.jdbc.driver.T4CConnection.createArrayOf(Ljava/lang/String;[Lja
va/lang/Object;)Ljava/sql/Array;
at jdbc2.array.ArrayStore2.main(ArrayStore2.java:12)

I am using oracle 10g express edition. Is there is problem with driver or something else? Please help me.
 
NitishK Kumar
Ranch Hand
Posts: 40
Firefox Browser Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Thank you, I got the clarity.
And sorry, by mistake I posted the previous problem in this thread.
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator

NitishK Kumar wrote:... by mistake I posted the previous problem in this thread.


OK. Let's continue that discussion here.
    Bookmark Topic Watch Topic
  • New Topic