Skip to Content.
Sympa Menu

freetds - RE: [freetds] Stored Proc

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
  • To: "'FreeTDS Development Group'" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Stored Proc
  • Date: Wed, 12 Nov 2003 09:24:38 -0000

Hi David,

The simple answer is that a stored procedure can be executed via freetds
just as any other SQL command is.

so instead of subnitting the SQL string "select * from authors" you can
submit "exec <stored procedure>"
If the stored procedure returns a result set or sets, they can be processed
just the same as a result set from a SQL query.

It gets a bit more complicated with input and (especially) out put
parameters.

If you have input parameters, then you would have to construct the SQL
string with the parameter values as literals, e.g:

"exec <store procedure> @charparam = 'value', @intparam = 123, @dateparam =
'Jan 1 2003' "

output parameters are more problematic. I'll explain further if you need to
do this.

Which API are you using (dblib, ODBC, ctlib ?)
Which server are you connecting to (Sybase or SQL ? which version of SQL ?)
If you are connecting to SQL Server 2000, do you know the Service Pack ? is
it SP3 or higher ?)

Bill


> -----Original Message-----
> From: David Nsengiyumva [SMTP:davidn AT finsolutions.co.za]
> Sent: 12 November 2003 08:58
> To: freetds AT lists.ibiblio.org
> Subject: [freetds] Stored Proc
>
> Does anyone know how FreeTDS works with Stored Procs. I'm just using
> FreeTDS
> as my Db driver and would like to pass Stored Procs with possibly date,
> numeric and string types as parameters...
>
> David Nsengiyumva
>
> Software Developer
> Tel: +27 21 464 7215
> Cel: +27 73 351 3975
> Fax: +27 21 464 7201
> http://www.finsolutions.co.za
>
> CONFIDENTIALITY CAUTION
> This page and any accompanying documents contain privileged and
> confidential
> information for the specific individual to whom it is addressed, and are
> protected by law. If the reader is not the intended recipient, you are
> hereby notified that any review, dissemination, distribution or copying or
> the taking of any action based on the contents of this communication is
> strictly prohibited. If you have received this communication in error,
> please desist from reading the contents, notify us immediately and destroy
> the communication.
>
>
>
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds




  • [freetds] Stored Proc, David Nsengiyumva, 11/12/2003
    • <Possible follow-up(s)>
    • RE: [freetds] Stored Proc, Thompson, Bill D (London), 11/12/2003

Archive powered by MHonArc 2.6.24.

Top of Page