Subject | Re: Using JayBird from Netbeans |
---|---|
Author | Jinwah Serapis |
Post date | 2007-06-29T06:02:08Z |
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:
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:
>DriverManager.getConnection("jdbc:firebirdsql://localhost:3050/C://MYDB.fdb",
> 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 =
>
> "SYSDBA", "masterkey");DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:C:\\MYDB.fdb",
>
> 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 =
> > >
> >
>
> > > "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]
> >
>