Skip to Content.
Sympa Menu

freetds - Re: Stored procedure and JDBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Bob Kline <bkline AT rksystems.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Stored procedure and JDBC
  • Date: Tue, 4 Apr 2000 10:34:05 -0400 (EDT)


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.

Here's an example of a call to a stored procedure which takes one input
parameter and produces a result set with two columns (INT and VARCHAR):

Connection c = DriverManager.getConnection(url, uid, pwd);
Statement s = c.createStatement();
ResultSet rs = Stmt.executeQuery("exec sp_t 50");
while (rs.next())
System.out.println(rs.getInt(1) + ", " + rs.getString(2));

Hope this helps.

--
Bob Kline
mailto:bkline AT rksystems.com
http://www.rksystems.com






Archive powered by MHonArc 2.6.24.

Top of Page