Hi,
U can use 'CallableStatement' to execute ur stored procedure. This is a
standard jdk api interface, so works well with all the drivers, provided ur
database & odbc layer supports it.
Follow these steps.
CallableStatement stmt = connection.prepareCall(sqlstring);
sqlstring is the string u'll writye on sql prompt to call the SP like 'call
proc-1 [<arg1>,<arg2>, ...]'. Input and output params values can be set
prior to calling the SP.
For more information refer the api docs.
Regards,
Atul.
> -----Original Message-----
> From: Jianhong [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, January 17, 2000 1:20 PM
> To: [EMAIL PROTECTED]
> Subject: Pls. help[off topic]
>
> Hi,
>
> I have a stored procedure, but I don't know how to run and get
> result from it using JDBC-ODBC bridge. The following is the
> procedure, any help would be very appreciated.
>
> create procedure proc_1
> (@siteID <mailto:(@siteID> int, @catID <mailto:@catID> int, @result
> <mailto:@result> char(200) output) as
> select @result <mailto:@result> = siteURL from classifiedSite
> where siteID = @siteID <mailto:@siteID> and catID = @catID <mailto:@catID>
>
> Jianhong
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html