Stored procedure and JDBC

Henry Lu zhlu at umich.edu
Tue Apr 4 08:02:12 EDT 2000


I sent out a similar question last week and I have not got any detailed
answer how to do. I am very interested to see if someone can help us
out on this issue.


---------------------------------------------------------------------------
Henry Lu
Computer Systems Programmer III         e-mail: zhlu at umich.edu
MCIT                                            phone: (734) 936-2063
University of Michigan Medical Center           fax:   (734) 763-4372

On Tue, 4 Apr 2000, Emmanuel Blot wrote:

> Hello,
> 
> I am looking for hours to get FreeTDS to work with SQL server 7.0 stored 
> procedure.
> 
> I would like to place a call like:
> {sp_procedure_name param1, param2, param3} (params are always input 
> parameters)
> and get the output parameters from the result set, for example:
> 
> ResultSet rs = st.executeQuery();
> 
> int i;
> 
> if (rs.next())
> {
>   i = rs.getInt("output_parameter")
> }
> 
> I do not find a correct syntax to call the procedure.
> 
> I tried, with connection.prepareCall():
> 
> {call sp_procedure_name param1, param2, param3}
> {exec sp_procedure_name param1, param2, param3}
> {call sp_procedure_name(param1, param2, param3)}
> {sp_procedure_name param1, param2, param3}
> {sp_procedure_name (param1, param2, param3)}
> {call sp_procedure_nam(?,?,?)} + statement.setXXX(1, value) [etc]
> 
> I really do not know how to get it to work.
> 
> Thank for your help,
> 
> Emmanuel.
> 
> ---
> You are currently subscribed to freetds as: zhlu at umich.edu
> To unsubscribe, forward this message to $subst('Email.Unsub')
> 




More information about the FreeTDS mailing list