Help coderanch get a
new server
by contributing to the fundraiser
    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: 41944
911
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: 2662
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.
 
And inside of my fortune cookie was this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
    Bookmark Topic Watch Topic
  • New Topic