freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds)
- From: "Anton van Straaten" <anton AT appsolutions.com>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds)
- Date: Mon, 10 Sep 2001 09:29:26 -0400
Bob,
Thanks for the info. Based on other reports, it seems that SQL 7 and 2000
don't suffer from this problem. Of course I don't think anyone else has yet
tried it under SQL 6.5, so it's still possible I have some problem on my
end.
I'm now using the JUnit test, freetds.AsTest, which Andreas kindly wrote and
put into CVS. This test generates the same error for me, if you want to see
an example of client code which causes the problem. (I'll send you mine but
it's uglier :)
I tried your sample as a sanity check (sanity is good), with the same
results.
Later today I'll investigate the latest suggestion from Andreas. However,
as I mentioned, I don't want to waste anyone's time on this if it's not
something simple. I mainly wanted to make sure I wasn't missing something
and also get a bit of a better handle on the nature of the problem.
Anton
> -----Original Message-----
> From: bounce-freetds-132811 AT franklin.oit.unc.edu
> [mailto:bounce-freetds-132811 AT franklin.oit.unc.edu]On Behalf Of Bob
> Kline
> Sent: Monday, September 10, 2001 8:38 AM
> To: TDS Development Group
> Subject: [freetds] Re: Why can't this stored procedure be called?
> (FreeTDS_JDBC and jtds)
>
>
> On Mon, 10 Sep 2001, Anton van Straaten wrote:
>
> > To summarize for anyone else reading this, here's a stored procedure
> > for MS SQL 6.5 which works fine in all environments, but I can't
> > successfully call with any version of the FreeTDS JDBC drivers,
> > including the SourceForge version or Curt Hagenlocher's version:
> >
> > create procedure spTestExec as
> > create table #tmp ( Result varchar(50) )
> > insert #tmp execute spTestExec2
> > select * from #tmp
> >
> > The above depends on the following procedure:
> >
> > create procedure spTestExec2 as
> > select 'Did it work?' as Result -- substitute text
> depending on degree of
> > optimism
> >
> > If anyone is kind enough to take the time to try this and can
> > actually get it working with SQL 6.5 and FreeTDS JDBC, please let me
> > know, because then at least I'll know that there's something wrong
> > with my setup or something I'm doing, rather than with the FreeTDS
> > JDBC driver. At the moment, I must admit I suspect a FreeTDS JDBC
> > limitation, although it's not clear to me why the innards of a
> > stored procedure should affect FreeTDS, other than the speculation
> > about multiple result sets in my first message.
>
> I have it working against SQL Server 7.0 using the March 7 code (I
> believe that's the latest change that has been made to the code on the
> freetds site). Don't have a convenient SQL Server 6.5 lying around.
>
> One thing I haven't seen is any of your Java code. Perhaps it might be
> helpful to compare what's working with what isn't. Mine looks like
> this:
>
> public static void main(String[] av) {
> String url = "jdbc:freetds:sqlserver://xxx/xxx;TDS=70";
> String uid = "xxx";
> String pwd = "xxx";
> try {
> Class.forName("com.internetcds.jdbc.tds.Driver");
> java.sql.Connection connection
> = java.sql.DriverManager.getConnection(url, uid, pwd);
> java.sql.Statement st = connection.createStatement();
> java.sql.ResultSet rs
> = st.executeQuery("EXEC spTestExec");
> while (rs.next())
> System.out.println(rs.getString(1));
> st.close();
> connection.close();
> }
> catch (Exception e) {
> e.printStackTrace();
> }
> }
>
> --
> Bob Kline
> mailto:bkline AT rksystems.com
> http://www.rksystems.com
>
>
> ---
> You are currently subscribed to freetds as: [anton AT appsolutions.com]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')
>
-
Why can't this stored procedure be called? (FreeTDS_JDBC and jtds),
Anton van Straaten, 09/09/2001
- <Possible follow-up(s)>
- Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds), PMoore, 09/09/2001
- Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds), Anton van Straaten, 09/10/2001
- Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds), Anton van Straaten, 09/10/2001
-
Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds),
Bob Kline, 09/10/2001
- Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds), Bob Kline, 09/10/2001
- Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds), Anton van Straaten, 09/10/2001
- Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds), Anton van Straaten, 09/10/2001
- Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds), brlewis, 09/10/2001
- Re: Why can't this stored procedure be called? (FreeTDS_JDBC and jtds), Anton van Straaten, 09/10/2001
Archive powered by MHonArc 2.6.24.