freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Paul Hopkins" <phopkins AT hi-q.co.uk>
- To: freetds AT franklin.oit.unc.edu
- Subject: JDBC Metadata - Please Help
- Date: Mon, 30 Jul 2001 04:16:04 -0400
Hello,
I posted the item below a while back but unfortunately never got a
response. Since then I have got the latest JDBC source code and have
compiled it myself. When I run this against SQL Server 2000 I get the
following SQLException:
java.sql.SQLException: Protocol confusion. Got a 0x79 packet
has this been tested against 2000 or does it only support 7 or 6.5?
Thanks,
Paul.
Previous item below:
I am evaluating freeTDS and am tring to check whether it supports db
metadata. I am using the following code but getting the SQLException with
the message 'Confused'. Any help is appreciated.
Thanks, Paul
Class.forName("com.internetcds.jdbc.tds.Driver");
String url =
"jdbc:freetds:sqlserver://"+serverName+":1433/"+database;//+";TDS=7.0";
// Create the usename and password properties
try
{
// Create the connection
Connection c = DriverManager.getConnection( url, username, password );
// Run a simple query
Statement s = c.createStatement();
ResultSet rs = s.executeQuery("select * from phSourcePerson");
while (rs.next())
{
System.out.println(rs.getString(1) + " : " + rs.getInt(2));
}
rs.close();
s.close();
System.out.println("Retrieving a list of all tables");
DatabaseMetaData md = c.getMetaData();
// THIS IS THE CALL THAT FAILS
rs = md.getTables( null, null, "phSourcePerson", new String[]{"TABLE"});
System.out.println("After");
while (rs.next())
{
System.out.println(rs.getString(1));
}
rs.close();
c.close();
-
JDBC Metadata - Please Help,
Paul Hopkins, 07/30/2001
- <Possible follow-up(s)>
- Re: JDBC Metadata - Please Help, Bob Kline, 07/30/2001
Archive powered by MHonArc 2.6.24.