Subject Re: Connection Java_Firebird
Author Ruslan Cheremin
It is not what I mean. Put _all_ your code in try-catch block, print
stack trace of exception and post it please.

Thanks,

Ruslan Cheremin

--- In Firebird-Java@yahoogroups.com, "Allysson Costa" <grounde@b...>
wrote:
> I have trying for a long time make a
> connection between java e firebird
> without sucesful. Can anyone help me.
>
> The error message is:
>
> bdados.java [125:1] unreported
> exception java.sql.SQLException; must
> be caught or declared to be thrown
> conexao =
> DriverManager.getConnection
("jdbc:firebirdsql:localhost/3050:/var/intranet/bdados/bdados.gdb","sy
sdba","masterkey");
>
> My code is:
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> try
> {
>
> Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();
>
> }
> catch (Exception E)
> {
> System.err.println("Unable to load
> driver.");
> E.printStackTrace();
> }
>
> Connection conexao =
> DriverManager.getConnection
>
("jdbc:firebirdsql:localhost/3050:/var/intranet/bdados/bdados.gdb","sy
sdba","masterkey");
>
> Statement stmt =
> conexao.createStatement();
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> What are the imports I need to do?
> I made:
> import java.io.*;
> import java.sql.*;
> import org.firebirdsql.encodings.*;
> import org.firebirdsql.gds.*;
> import org.firebirdsql.jca.*;
> import org.firebirdsql.jdbc.*;
> import org.firebirdsql.jgds.*;
> import org.firebirdsql.logging.*;
> import org.firebirdsql.management.*;
> import java.util.*;
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Thanks,
>
> Allysson
>
>
>
______________________________________________________________________
____
> Acabe com aquelas janelinhas que pulam na sua tela.
> AntiPop-up UOL - É grátis!
> http://antipopup.uol.com.br/