Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

??? Increase the statement cache size???

2 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-09-25 12:28:18.0Z
kevin wang Posted on 1997-09-25 07:00:03.0Z
Message-ID: <342A0BF3.89941905@mwr.gov.cn>
Date: Thu, 25 Sep 1997 15:00:03 +0800
From: kevin wang <kevin@mwr.gov.cn>
X-Mailer: Mozilla 4.03 [en] (Win95; I)
MIME-Version: 1.0
Subject: ??? Increase the statement cache size???
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 115
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:236
Article PK: 251988

hello,
I have download the jConnect 3.0 from www.sybase.com and now I begin to
developer the jdbc program.
I use jdk 1.1.3 and jConnect 3.0. my os is win95 and sybase SQL
server is
in sun's solaris os. my autoexec.bat conclude:

path c:\pb4;c:\pb4dk;c:\sj;c:\jdk1.1.3\bin
SET HOME = C:\
SET JDBC_HOME=c:\progra~1\sybase\jconnect
SET JAVA_HOME=c:\jdk1.1.3
SET
CLASSPATH=c:\progra~1\sybase\jconnect\classes;c:\jdk1.1.3\lib\classes.zip

I change the jConnect sample program
"IsqlApp.java" to connect to my sybase server. I type
"c:\java IsqlApp"
to run it. But it cann't run successfully! it's errors are:
"
Unexpected exception : java.sql.SQLException: JZ006: Caught
IOException.java.net.NoRouteToHostException: Operation timed out

at com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
at com.sybase.tds.Tds.login(Tds.java)
at com.sybase.jdbc.SybConnection.<init>(SybConnection.java)
at com.sybase.jdbc.SybDriver.connect(SybDriver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:91)
at IsqlApp.main(IsqlApp.java)
"
I search "JZ006" from the programer's Referance. It says the error
are often the result of network communication problems.the supposed
action is "Increase the statement cache size". But I don't know what
the mean "Increase the statement cache size". so I don't know how to
solve the problem. Can you help me?

Another question is I use command:
" c:\java IsqlApp -U kevin -P abcdefg -S
jdbc:sybase:Tds:1.0.1.7:2048/idbs "
It show an error "010SJ" . I don't know what the mean is "database
metadata". If I set the property "USE_METADATA" to false, will my
application
still run well?

wait your reply.
thank you again!

kevin

my program is here, is there any error in the program:

import java.awt.*;
import java.lang.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import com.sybase.jdbc.*;
import com.sybase.utils.Debug;

public class IsqlApp
{
public static void main(String args[])
{
try
{
Class.forName("com.sybase.jdbc.SybDriver");
}
catch(ClassNotFoundException cnfe)
{
System.out.println("Unable to load the Sybase JDBC
driver."+cnfe.toString());
cnfe.printStackTrace(System.out);
}
try
{
/*
* Open the connection. May Throw a SQLException.
* Parameters:
* url - "jdbc:sybase:Tds:host:port num"
* user - user login id
* password - user login password
*/
Connection con = DriverManager.getConnection(
"jdbc:sybase:Tds:1.0.1.7:2048/idbs", "kevin",
"abcdefg");
/*
* Create a statement object, the container for the
SQL
* statement. May throw a SQLException.
*/
Statement stmt = con.createStatement();
/*
* Create a result set object by executing the
query.
* May throw a SQLException.
*/
ResultSet rs = stmt.executeQuery("Select * from
dbo.SB_STHD");
/*
* Process the result set.
*/

if ((rs != null) && (rs.next()))
{
int value = rs.getInt(1);
System.out.println("Fetched value " + value);
}
}
/*
* Exception handling.
*/

catch (SQLException sqe)
{
System.out.println("I am failed! Sorry!") ;
System.out.println("Unexpected exception : " +
sqe.toString() + ", sqlstate = " +
sqe.getSQLState());
System.exit(1);
}
System.exit(0);
}
}

thanks again!
kevin


Lance Andersen Posted on 1997-09-25 12:28:18.0Z
Message-ID: <342A58E2.3566@sybase.com>
Date: Thu, 25 Sep 1997 08:28:18 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
Subject: Re: ??? Increase the statement cache size???
References: <342A0BF3.89941905@mwr.gov.cn>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 41
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:235
Article PK: 251987


> Unexpected exception : java.sql.SQLException: JZ006: Caught
> IOException.java.net.NoRouteToHostException: Operation timed out
>
> at com.sybase.jdbc.ErrorMessage.raiseError(ErrorMessage.java)
> at com.sybase.tds.Tds.login(Tds.java)
> at com.sybase.jdbc.SybConnection.<init>(SybConnection.java)
> at com.sybase.jdbc.SybDriver.connect(SybDriver.java)
> at java.sql.DriverManager.getConnection(DriverManager.java:91)
> at IsqlApp.main(IsqlApp.java)

>From your win95 box, can you telnet to the ip and port that you
are using. The error leads me to believe that you cannot get
to the solaris box. You could also try using the hostname
instead of the ip.

> Another question is I use command:
> " c:\java IsqlApp -U kevin -P abcdefg -S jdbc:sybase:Tds:1.0.1.7:2048/idbs "
> It show an error "010SJ" . I don't know what the mean is "database
> metadata". If I set the property "USE_METADATA" to false, will my application
> still run well?
> Warning: java.sql.SQLWarning: 010SJ: Metadata accessor information was not found on this database: java.sql.SQLException: JZ0SJ: Metadata accessor information was not found on this database

This message is telling you that you have not run the sql_server.sql
script successfully.

Your options are:

- run the script
- ignore warning
- set USE_METADATA to false


if you set USE_METADATA to false or you do not run the script, then
you wil not be able to use any of the DatabaseMetaData methods as
well as some of the Connection methods such as setAutoCommit.


REgards,

-lance