Skip to Content.
Sympa Menu

freetds - Re: stored procedure call in jdbc

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: stored procedure call in jdbc
  • Date: Tue, 28 Mar 2000 11:33:01 -0800 (PST)


Jon Pounder writes:
>
> hmmm, not sure even how to do that....
>
>
> I have always gotten around the problem with the various odbc clients I
> have used by rewriting the sp to return multiple result sets and never
> using output parameters in the call. Never found a situation I couldn't do
> that.

If the driver is written correctly then the OUTPUT param should simply
come as an addition result set.

Note that for the OUTPUT param to be returned you have to declare a
T-SQL variable to hold it.

Michael


>
>
> At 01:29 PM 3/28/00 -0500, you wrote:
> >As matter of fact, this is an OUTPUT parameter. Could you give
> >me an example of calling string?
> >
> >
> >---------------------------------------------------------------------------
> >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, 28 Mar 2000, Jon Pounder wrote:
> >
> >> ahh - I didn't realize that was part of the query string, I thought it
> >> was
> >> just because it was a question.
> >>
> >>
> >> yes I agree then if that is the case, that is the trouble for sure.
> >>
> >> just put the value in place of the "?".
> >>
> >>
> >> At 09:21 AM 3/28/00 -0800, you wrote:
> >> >Jon Pounder writes:
> >> > > hmmm - not sure what would be "not implemented" there.
> >> >
> >> >Probably the ? which should potentially be replaced by a parameter in
> >> >the stored proc call.
> >> >
> >> >I know that Sybase does not support ?-style placeholder parameters to
> >> >stored procs at the protocol level, so unless the driver does the
> >> >replacement and quoting itself this won't work (and I know that the C
> >> >side of FreeTDS does not handle ?-style placeholders at all at the
> >> >moment).
> >> >
> >> >Michael
> >> >
> >> >
> >> > > At 12:06 PM 3/28/00 -0500, you wrote:
> >> > > >Thanks for your info but I got error:
> >> > > >java.sql.SQLException: not implemented
> >> > > >
> >> > > >The query is :
> >> > > >"exec get_print_no ?"
> >> > > >
> >> > > >
> >> > >
> >>
> >---------------------------------------------------------------------------
> >> > > >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, 28 Mar 2000, Jon Pounder wrote:
> >> > > >
> >> > > >>
> >> > > >> not sure on the jdbc part, but in general your sql statement just
> looks
> >> > > >> like this:
> >> > > >>
> >> > > >> "exec sp_whatever parm1, parm2, parm3"
> >> > > >>
> >> > > >> the driver should be smart enough to figure out whether this has
> >> > > >> a
> >> select
> >> > > >> in it or not and act accordingly based on the results that come
> back.
> >> > > >>
> >> > > >>
> >> > > >> At 11:42 AM 3/28/00 -0500, you wrote:
> >> > > >> >Is there any example of calling a stored procedure with
> >> > > >> >SQL-Server
> >> JDBC?
> >> > > >> >
> >> > > >> >
> >> > > >>
> >> > >
> >>
> >---------------------------------------------------------------------------
> >> > > >> >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
> >> > > >> >
> >> > > >> >
> >> > > >> >---
> >> > > >> >You are currently subscribed to freetds as: pounder AT inline.net
> >> > > >> >To unsubscribe, forward this message to
> >> > > >> $subst('Email.Unsub')
> >> > > >> >
> >> > > >> >
> >> > > >>
> >> > > >> Jon Pounder, Development Engineer
> >> > > >> Inline Internet Systems
> >> > > >> pounder AT inline.net Jon AT Pounder.com
> >> > > >>
> >> > > >> Web Tools Engineered for Success
> >> > > >> http://www.inline.net
> >> > > >> http://www.ihtml.com
> >> > > >>
> >> > > >>
> >> > > >>
> >> > > >> ---
> >> > > >> You are currently subscribed to freetds as: zhlu AT umich.edu
> >> > > >> To unsubscribe, forward this message to
> >> > > $subst('Email.Unsub')
> >> > > >>
> >> > > >
> >> > > >
> >> > > >---
> >> > > >You are currently subscribed to freetds as: pounder AT inline.net
> >> > > >To unsubscribe, forward this message to
> >> > > $subst('Email.Unsub')
> >> > > >
> >> > > >
> >> > >
> >> > > Jon Pounder, Development Engineer
> >> > > Inline Internet Systems
> >> > > pounder AT inline.net Jon AT Pounder.com
> >> > >
> >> > > Web Tools Engineered for Success
> >> > > http://www.inline.net
> >> > > http://www.ihtml.com
> >> > >
> >> > >
> >> > >
> >> > > ---
> >> > > You are currently subscribed to freetds as: mpeppler AT peppler.org
> >> > > To unsubscribe, forward this message to
> >> $subst('Email.Unsub')
> >> > >
> >> >
> >> >--
> >> >Michael Peppler -||- Data Migrations Inc.
> >> >mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
> >> >Int. Sybase User Group -||- http://www.isug.com
> >> >Sybase on Linux mailing list: ase-linux-list AT isug.com
> >> >
> >> >---
> >> >You are currently subscribed to freetds as: pounder AT inline.net
> >> >To unsubscribe, forward this message to
> >> $subst('Email.Unsub')
> >> >
> >> >
> >>
> >> Jon Pounder, Development Engineer
> >> Inline Internet Systems
> >> pounder AT inline.net Jon AT Pounder.com
> >>
> >> Web Tools Engineered for Success
> >> http://www.inline.net
> >> http://www.ihtml.com
> >>
> >>
> >>
> >> ---
> >> You are currently subscribed to freetds as: zhlu AT umich.edu
> >> To unsubscribe, forward this message to
> $subst('Email.Unsub')
> >>
> >
> >
> >---
> >You are currently subscribed to freetds as: pounder AT inline.net
> >To unsubscribe, forward this message to
> $subst('Email.Unsub')
> >
> >
>
> Jon Pounder, Development Engineer
> Inline Internet Systems
> pounder AT inline.net Jon AT Pounder.com
>
> Web Tools Engineered for Success
> http://www.inline.net
> http://www.ihtml.com
>
>
>
> ---
> You are currently subscribed to freetds as: mpeppler AT peppler.org
> To unsubscribe, forward this message to $subst('Email.Unsub')
>

--
Michael Peppler -||- Data Migrations Inc.
mpeppler AT peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list AT isug.com




Archive powered by MHonArc 2.6.24.

Top of Page