Inserting a StoredProcedure - how do I know the result?

R

R@nsh!

Hi.
assuming I'm calling
statement.execute(props.getProperty("OraStoredProcedure"));

where this property is an sql that creates a stored procedure, how do I know
if this operation was succesful or not?

I'm on jdk1.3.1, and can't move to 1.4.

TnX!
 
V

Virgil Green

R@nsh! said:
Hi.
assuming I'm calling
statement.execute(props.getProperty("OraStoredProcedure"));

where this property is an sql that creates a stored procedure, how do I know
if this operation was succesful or not?

I'm on jdk1.3.1, and can't move to 1.4.

I would guess it would manifest itself as an SQLException, but that would
depend upon the driver your using.
 
V

Virgil Green

Virgil Green said:
I would guess it would manifest itself as an SQLException, but that would
depend upon the driver your using.

gaaak... "you're"
 
R

R@nsh!

Well, I found out: that would require using the connection.getMetadata(),
and then using the resulting DatabaseMetaData object to query the db about
it's stored procedures.
Virgil - tnx a lot for your efforts!
 
V

Virgil Green

R@nsh! said:
Well, I found out: that would require using the connection.getMetadata(),
and then using the resulting DatabaseMetaData object to query the db about
it's stored procedures.
Virgil - tnx a lot for your efforts!

That would be necessary to check for the existence of a stored procedure. It
has nothing to do with whether or not your operation was successful. What if
the stored procedure you are trying to create already exists and that's the
reason your creation failed? Does the JDBC drive you're using not issue an
Exception if the creation of your stored procedure fails?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top