A couple of things to try to narrow things down. 
 
1. creating an ODBC connection using asp or vbscript. Plenty of examples
on the web. 
 
2. Load the driver in a static block or somewhere else independent of
where the connection is created. Drivers only need to be loaded once, so
see if the performance improves if you don't repeatedly load it. 
 
3. Try connection pooling. 

>>>[EMAIL PROTECTED] 01/04 10:23 am >>>
Could this speed issue be caused by a poor setup?  When I remove the
database connection from my code, the pages run fast.  Though I
obviously need the database portion of the code in there. 

Thanks
Charles


-----Original Message-----
From: David Boyer [mailto:[EMAIL PROTECTED]
Sent: Monday, January 03, 2005 9:05 AM
To: tomcat-user@jakarta.apache.org; Charles P. Killmer
Subject: RE: Speed issues with SQL Server 2000 and JTDS

You could try using something like jProfiler to see where the bottleneck
is.

I don't see anything unusual in your code example, although it looks
like the only thing it does is create the connection. I use jTDS and it
works fine without doing anything exceptional.



>>>[EMAIL PROTECTED] 01/03 8:55 am >>>

This is some representative code that is being very slow. 


import java.sql.*;


public class SomeClass {

  public Connection conn;

public int ID;

public String Name;

public String Address;

public String City;

public String OtherStuff;


  public SomeClass() throws Exception {

      try {

          Class.forName(net.sourceforge.jtds.jdbc.Driver);

      } catch (ClassNotFoundException ex) {

      }

      try {

   

Reply via email to