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 = ""> 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 =
""> 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 =
"";
user =
"teste";
password = "teste";