Skip to Content.
Sympa Menu

freetds - Re: Protocol confusion for stored procedure invocation [was: JDBC driver error]

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>
  • Cc: Fawzib Rojas <spectron AT caribe.net>
  • Subject: Re: Protocol confusion for stored procedure invocation [was: JDBC driver error]
  • Date: Fri, 27 Apr 2001 17:02:25 -0400 (EDT)


On Fri, 27 Apr 2001, Fawzib Rojas wrote:

> I get the following exception when I'm running a stored procedure
> that returns a resultset (works on ISQLW in MS SQL 6.5):
>
> com.internetcds.jdbc.tds.TdsConfused: Protocol confusion- .....
>
> The stored procedure creates temporary tables, cursors and saves all
> the information in declared variables and in the end just does a
> select that looks like this:
>
> select @var1 as 'var1', @var2 as 'var2'
>
> Like I said, in ISQL it looks ok, so I guess it is a bug in the JDBC
> driver. Is there anything I can do to make this query work?

---------------------------------------------------------------------

There's a good possibility that the problem you described may have been
fixed in a more recent version of the driver code. In order for someone
to reproduce your problem, you need to supply a bit more information.
At a minimum:

1. The version(s) of freetds_jdbc you are using.
2. The version(s) of the TDS protocol you are using.
3. The version(s) of the JVM you are using.
4. Which DBMS you are using (including version and platform).
5. Which platform(s) you are running your client software on.
6. Whether the problem is present with the latest snapshot.
7. What other layers are present (e.g., CGI wrappers).

To determine #1, for each version of the driver you've tried and with
which you've experienced the problem, run `ident freetds_jdbc.jar' and
report the date for the most recently modified source code file.

For #2, unless you're specifying ";tds=[version]" in your connection
URL, you're using TDS 4.2. Otherwise, you're specifying the TDS version
explicitly.

To find out the version of the JVM you're using (item #3), look at the
output from the command `java -version'.

For #4, report the output from the query `SELECT @@VERSION' (this will
tell us which service pack you're running as well as the major version
number and the particulars of the operating system underneath the DBMS).
Depending on the nature of your problem, it may also be appropriate to
include other information, such as the character set installed. Use
your judgment.

You can get the information for #5 from the output of `uname -a' on
*n*x systems, or from `VER' on Windows systems.

For question #6, you need to pick up freetds_jdbc.snapshot.jar from [1]
and determine whether the problem is resolved. If it is, you should
probably just upgrade to the latest snapshot. (Remember, this is not
production software -- the README describes it as a "sneak peek at an
incomplete driver" -- so questions like "Is this version stable enough
for my mission-critical production system?" aren't as appropriate as
they would be in other contexts. You're welcome to contribute to the
project's work to help get closer to that goal, though.) Be sure to
inform the list in this case, so someone doesn't waste time trying to
track down a problem which has already been resolved.

In addition, any code needed to reproduce the problem (including any
stored procedures) should also be included. Try to reduce the problem
to the minimum amount of code which is capable of exhibiting the
behavior you're describing. Don't include any sensitive information
(such as account names and passwords).

[1] ftp://freetds.internetcds.com/pub/freetds_jdbc/

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








Archive powered by MHonArc 2.6.24.

Top of Page