Ola!

Coloca o jtds-*.jar no CLASSPATH.

Acho q isso resolve.

[ ]s

--------------------
Fabiano Cruz
Coord
JUG Petropolis
--------------------

>Pessoal,
>Estou tentando uma conex�o com o SQL Server atrav�s do driver JTDS.
>Criei a classe Conexao que le um arquivo (minhas.properties). 
>At� aqui tudo certo...(eu acho).
>ent�o o erro....
>ClassNotFoundException:net.sourceforge.jtds.jdbc.Driver
>
>O que eu fa�o? 
>[]s
>Gustavo 
>
>
>=========================>=========================>======
>
>
>import java.sql.Connection;
>import java.util.Properties;
>
>public class Connection {
>
> public static Connection myConnection() {
>
>  String driver = null;
>  String url = null;
>  String user = null;
>  String password = null;
>
>  // Carrega propriedades cadastradas no arquivos
>  PropertiesUtils propertiesUtils = new PropertiesUtils();
>  Properties props = null;
>
>  try {
>   props = propertiesUtils.loadProperties("minhas.properties");
>   driver = props.getProperty("driver").replaceAll("\"","");
>   url = props.getProperty("url").replaceAll("\"","");
>   user = props.getProperty("user").replaceAll("\"","");
>   password = props.getProperty("password").replaceAll("\"","");
>  } catch (Exception e) {
>
>      java.out.println("Deu problema aqui" + e);
>
>  }
>
>
>  Connection con = DBUtils.getConnection(driver, url, user, password);
>
>  return con;
>
> }
>}
>
>/*========================>=========================>===
>   Conteudo do  arquivo minhas.properties
>=========================>=========================>==*/
>
>driver = "net.sourceforge.jtds.jdbc.Driver";
>url = "jdbc:jtds:sqlserver://localhost:1433/bancoTeste";  
>user = "teste";
>password = "teste";
>
>
>

----------------------------------
WebMail service by rionet.com.br �


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/5cFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/jug-petropolis/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Atrašyti