Subject Re: [Firebird-Java] Connection Java_Firebird
Author Luca Lafranchi
Also, you don't need any of the org.firebirdsql.* packages in your import, if you are using DriverManager.
But this is only a detail...

Allysson Costa 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 =3D DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:/var/intranet/=
> bdados/bdados.gdb","sysdba","masterkey");
>
> My code is:
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX try=20 {=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20=20=20
> Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();
>
> }=20 catch (Exception E)=20 {=20 System.err.println("Unable to load driver.");=20 E.printStackTrace();=20 } =20=20=20=20 Connection conexao =3D DriverManager.getConnection
> ("jdbc:firebirdsql:localhost/3050:/var/intranet/bdados/bdados.gdb","sysdba"= ,"masterkey");
>
> Statement stmt =3D conexao.createStatement();=20 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
>
> =20 __________________________________________________________________________ Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - =C9 gr=E1tis! http://antipopup.uol.com.br/
>
>
>
> ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark Printer at Myinks.com. Free s/h on orders $50 or more
> to the US & Canada. h= ttp://www.c1tracking.com/l.asp?cid=3D5511 http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/saFolB/TM ---------------------------------------------------------------------~->
>
> To unsubscribe from this group, send an email to: Firebird-Java-unsubscribe@yahoogroups.com
>
> =20
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20
>
>