Unix Technical Forum

Java calling a stored procedure...

This is a discussion on Java calling a stored procedure... within the Informix forums, part of the Database Server Software category; --> Ok... for those java jdbc gurus out there... In Java, you open a connection, then create a statement object. ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 04:11 PM
Ian Michael Gumby
 
Posts: n/a
Default Java calling a stored procedure...


Ok... for those java jdbc gurus out there...

In Java, you open a connection, then create a statement object.

>From this statement object, you executeUpdate(<string>) where <string> is

your SQL statement.


When executing a stored procedure that doesn't return anything, Java is
recommending that you surround the stored procedure call with {}.

The question is why?

Why are calling stored procedures different from executing any other SQL
statement?

TIA!

-G

__________________________________________________ _______________
Mortgage rates as low as 4.625% - Refinance $150,000 loan for $579 a month.
Intro*Terms http://www.NexTag.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 04:11 PM
Doug Lawry
 
Posts: n/a
Default Re: Java calling a stored procedure...

Ian,

A statement string such as "{call procedure-name(parameters)}" is converted to
the database-specific syntax, making your Java application more portable between
database products.

--
Regards,
Doug Lawry
www.douglawry.webhop.org


"Ian Michael Gumby" <im_gumby@hotmail.com> wrote in message
news:mailman.227.1171914232.10648.informix-list@iiug.org...
>
> Ok... for those java jdbc gurus out there...
>
> In Java, you open a connection, then create a statement object.
>
>>From this statement object, you executeUpdate(<string>) where <string> is

> your SQL statement.
>
>
> When executing a stored procedure that doesn't return anything, Java is
> recommending that you surround the stored procedure call with {}.
>
> The question is why?
>
> Why are calling stored procedures different from executing any other SQL
> statement?
>
> TIA!
>
> -G



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:31 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com