Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / September 2006

Tip: Looking for answers? Try searching our database.

is there a JDBC equivalent to Oracle's PRO*C DESCRIBE operation?

Thread view: 
shib - 17 Sep 2006 21:09 GMT
I am porting code from Oracle's PRO*C to JDBC.

In PRO*C, if I have a text which represents an unknown SQL statement, I can
describe it and get the names (and number) of bind variables in it.

For example, describing

SELECT a,b from t where a= :bind1 and b= :bind2

Will return the result of two input bind variables, whose name is :bind1 and
:bind2. I can also get the names & types of the output variables (a & b in
this case).

Is there any JDBC equivalent for this (I know in JDBC binds are represented
as ?, however oracle-specific JDBC drivers also support the above syntax).

Thanks,
Ilan
IchBin - 17 Sep 2006 21:16 GMT
> I am porting code from Oracle's PRO*C to JDBC.
>
[quoted text clipped - 14 lines]
> Thanks,
> Ilan

If i understand you correctly then sure look at the PREPARE statement.

Signature

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA              http://weconsultants.phpnet.us
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)

Balaji - 22 Sep 2006 13:43 GMT
> I am porting code from Oracle's PRO*C to JDBC.
>
[quoted text clipped - 14 lines]
> Thanks,
> Ilan

Use the stored procedures to improve the performance of the JDBC.

4th type of drive is high performance driver..
Read Oracle JDBC Book for more information

http://d.1asphost.com/javaj2ee/ebooks/

Thanks
joeNOSPAM@BEA.com - 22 Sep 2006 15:37 GMT
> I am porting code from Oracle's PRO*C to JDBC.
>
[quoted text clipped - 14 lines]
> Thanks,
> Ilan

Hi. The closest equivalent is PreparedStatement.getMetaData(). You
would
create a prepared statement with the SQL, and then get the metadata.
Joe Weinstein at BEA Systems


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.