my dog learned polymorphism*
The moose likes JDBC and the fly likes Using PreparedStatement: Is there anything special for Oracle ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Using PreparedStatement: Is there anything special for Oracle ?" Watch "Using PreparedStatement: Is there anything special for Oracle ?" New topic
Author

Using PreparedStatement: Is there anything special for Oracle ?

Artemesia Lakener
Ranch Hand

Joined: Jun 21, 2005
Posts: 162
For PreparedStatement, I hvae used it for SQL server and Sybase. Is there anything special I need to pay attention to if I want to use it in Oracle ? what difference should I care ?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Do you know you're having a problem or just looking out for them?

The code for JDBC should be the same between servers, that is the way it is designed. The only difference I can think of is that Oracle give their classes additional methods, available through casting to the correct type. Not really advisable though.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30050
    
149

Artemesia,
Not specific to PreparedStatements, but make sure you aren't using any SQL server or Sybase specific SQL statements. Oracle uses standard SQL, so you will be ok if you didn't use any specific extensions.


[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
Adam Richards
Ranch Hand

Joined: Nov 03, 2005
Posts: 135
I agree with the previous post. I use PreparedStatement with Oracle all the time & it works just fine. Of coruse, if you're porting queries previously used in other RDBMS's, you'll need to ensure the SQL doesn't have any proprietary (i.e., non-standard) extensions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using PreparedStatement: Is there anything special for Oracle ?
 
Similar Threads
How you guys treat the " or ' fields inputs?
softSCWCD
PreparedStatement Error in DB2
Google celebrates Dali's birthday
how to handle single qotes (' ') in query