Estou tendo um problema para conectar com o banco de dados, abaixo seguem a classe e o erro:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DAO;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/**
*
* @author Leticia
*/
public class ConexaoBD
{
private String url = "jdbc:firebirdsql://localhost:3050/C:\\Documents and Settings\\Leticia\\Meus documentos\\NetBeansProjects\\SHIPS\\src\\DAO\\BDSHIPS.fdb";
private Connection con=null;
private Statement stm=null;
public static void main(String[] args) {
}
public ConexaoBD() throws SQLException , ClassNotFoundException
{
Class.forName("org.firebirdsql.jdbc.FBDriver");
con = DriverManager.getConnection(url,"SYSDBA","masterkey");
stm = con.createStatement();
}
public Statement getConexao() throws ClassNotFoundException, SQLException
{
return stm;
}
public ResultSet executarResearch(String sql)
{
ResultSet rs = null;
try
{
rs = this.stm.executeQuery(sql);
if (rs!=null)
{
return rs;
}
}catch(SQLException e)
{
System.out.println("Sql erro ao executar o comando SQL. Msg: "+e.getMessage());
}
catch(Exception e)
{
System.out.println("Erro ao executar o comando SQL. Msg: "+e.getMessage());
}
return null;
}
public void executarUpdate(String sql)
{
try
{
stm.executeUpdate(sql);
}
catch(Exception e)
{
System.out.println("Erro ao executar o comando SQL. Msg: "+e.getMessage());
}
}
public void executarInsert(String sql)
{
try
{
stm.executeUpdate(sql);
}
catch(Exception e)
{
System.out.println("Erro ao executar o comando SQL. Msg: "+e.getMessage());
}
}
public void executarDelete(String sql)
{
try
{
stm.executeUpdate(sql);
}
catch(Exception e)
{
System.out.println("Erro ao executar o comando SQL. Msg: "+e.getMessage());
}
}
}
Reason: I/O error for file open "C:\Documents and Settings\Leticia\Meus documentos\NetBeansProjects\SHIPS\src\DAO\BDSHIPS.fdb"
Error while trying to open file
alguem pode me ajudar??