This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

JDBC: Casting an int array to sql array.

 
NitishK Kumar
Ranch Hand
Posts: 40
Chrome Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can we cast an int[] to java.sql.Array?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33697
316
Eclipse IDE Java VI Editor
  • 1
  • Mark post as helpful
  • send pies
  • 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
Chrome Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • 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
Chrome Firefox Browser Java
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thank you, I got the clarity.
And sorry, by mistake I posted the previous problem in this thread.
 
Jan Cumps
Bartender
Posts: 2577
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
NitishK Kumar wrote:... by mistake I posted the previous problem in this thread.

OK. Let's continue that discussion here.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic