File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes What is the Diff between Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "What is the Diff between "byte[] v1;" and "byte [] v1;" ?" Watch "What is the Diff between "byte[] v1;" and "byte [] v1;" ?" New topic
Author

What is the Diff between "byte[] v1;" and "byte [] v1;" ?

Viswanathan Ramasamy
Greenhorn

Joined: Nov 14, 2005
Posts: 23
I'm creating a prepared statement for oracle using java. I want to convert the attribute to BLOB type. Wherein if I have my attribute as byte[] it is converting it to "java.sql.other" type, This worked properly when i gave the declaration as byte [](there is a space btwn byte and []). Could you please tell me what is the diff btwn these two stmt.


With Regards<br />Viswa
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
sounds like a bug in the JDBC driver, or else there's something Oracle specific I'm not privy to.


42
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
There is no difference between byte[] and byte [], as far as I know. I'm sure the reason must be something else.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

I'm going to move this to JDBC, although I don't think we've heard anything about the real causes of the problem.


[Jess in Action][AskingGoodQuestions]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Viswa,
Can you post a little code to show how you are passing/declaring the byte[]. Maybe something weird is going on with casting.

As Ilja pointed out, these should compile to the same bytecode.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: What is the Diff between "byte[] v1;" and "byte [] v1;" ?