Subject Re: [Firebird-Java] Re: Using JayBird from Netbeans
Author asha a.v
you can try loading the jaybird jar in your class
path,in netbeans add in application library,
I have attached a screen shot.


--- Jinwah Serapis <jinwah50@...> wrote:

> I am not sure if this is the best practice way to
> make it work but I
> added the following lines
>
> try {
>
>
Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();
> } catch (ClassNotFoundException ex) {
> ex.printStackTrace();
> } catch (IllegalAccessException ex) {
> ex.printStackTrace();
> } catch (InstantiationException ex) {
> ex.printStackTrace();
> }
>
> before getting the connection... and this works.
>
> If there is a better way I would be interested
> still.
>
> Thanks
>
> Jinwah
>
> --- In Firebird-Java@yahoogroups.com, "Jinwah
> Serapis" <jinwah50@...>
> wrote:
> >
> > Hi,
> >
> > Following your advice I have done the following..
> >
> > Gone to the Runtime window and added the database
> driver, I even made
> > a connection from here successfully and I can see
> the tables.
> >
> > But the following code:
> >
> > Connection connection = null;
> >
> > connection =
> >
>
DriverManager.getConnection("jdbc:firebirdsql://localhost:3050/C://MYDB.fdb",
> > "SYSDBA", "masterkey");
> >
> > Still causes the same error
> >
> > java.sql.SQLException: No suitable driver found
> for
> > jdbc:firebirdsql://localhost:3050/C://...
> >
> > So Netbeans knows about the driver and I can
> connect to the datbase
> > from the runtime window but not from code. I
> copied the database URL
> > directly from the connection that works in the run
> time window
> > connection, so I'm guessing its a reference
> problem?
> >
> > Thanks
> >
> > Jinwah
> >
> > --- In Firebird-Java@yahoogroups.com, "asha a.v"
> <asha_a_v@> wrote:
> > >
> > > Hi,
> > >
> > > Its easy, you can go to runtime window in
> netbeans
> > > ,select drivers and add jaybird jar.I have
> attached a
> > > screen shot here. Please refer.
> > >
> > >
> > > Asha.
> > >
> > >
> > >
> > > --- Jinwah Serapis <jinwah50@> wrote:
> > >
> > > > Hi,
> > > >
> > > > This should be simple to fix..
> > > >
> > > > I am using the following line to fetch a
> connection
> > > > object.
> > > >
> > > > connection =
> > > >
> > >
> >
>
DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:C:\\MYDB.fdb",
> > > > "SYSDBA", "masterkey");
> > > >
> > > > I have added jaybird-full-2.1.1.jar to my
> library
> > > > and the library to
> > > > my project.
> > > >
> > > > I am getting the following error..
> > > >
> > > > java.sql.SQLException: No suitable driver
> found for
> > > > jdbc:firebirdsql:localhost/3050:C:\...
> > > >
> > > > So my question is how do I get Netbeans to
> know
> > > > about the jaybird driver.
> > > >
> > > > Thanks
> > > >
> > > > Jinwah
> > > >
> > > >
> > >
> > >
> > > Asha.A.V
> > > Software Engineer
> > > SatPath Systems Inc.
> > > 46661,Fremont blvd.
> > > Fremont.CA.
> > >
> > >
> > >
> > >
> >
>
____________________________________________________________________________________
> > > Get the Yahoo! toolbar and be alerted to new
> email wherever you're
> > surfing.
> > >
>
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php
> > >
> > > [Non-text portions of this message have been
> removed]
> > >
> >
>
>
>


Asha.A.V
Software Engineer
SatPath Systems Inc.
46661,Fremont blvd.
Fremont.CA.



____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/

[Non-text portions of this message have been removed]