Subject | Re: [Firebird-Java] Access FireBird DB over VPN |
---|---|
Author | Mark Rotteveel |
Post date | 2010-07-29T16:12:17Z |
All three of them are wrong.
You need to use either:
jdbc:firebirdsql://<ip>:<port>/c:\Vol1\lcs\AUEG\Daten\mand2.GDB
(or if you are using an alias which is usually advisable:
jdbc:firebirdsql://<ip>:<port>/<alias>
Mark
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
You need to use either:
jdbc:firebirdsql://<ip>:<port>/c:\Vol1\lcs\AUEG\Daten\mand2.GDB
(or if you are using an alias which is usually advisable:
jdbc:firebirdsql://<ip>:<port>/<alias>
Mark
> Hello--
>
> I want to write a java client that uses jdbc to connect to the firebird-db
> over a vpn network.
> I downloaded the jaybird-full-2.1.6.jar and put it to the java build path
> of jdbc in eclipse.
>
> I'm not sure how to build the URL to connect to the db, because of the vpn
> network.
>
> I tried <IP>:c:\Vol1\lcs\AUEG\Daten\mand2.GDB and
> jdbc:firebirdsql://<IP>:c:\Vol1\lcs\AUEG\Daten\mand2.GDB:3050:/mand2 and
> jdbc:firebirdsql://<IP>:c:\Vol1\lcs\AUEG\Daten\mand2.GDB
>
> where <IP> is always the ip to the db server. The path is also correct.
>
> The code looks like that...
>
> private void connectL1()
> {
> try
> {
> Class.forName("org.firebirdsql.jdbc.FBDriver").newInstance();
> }
> catch (InstantiationException e)
> {
> e.printStackTrace();
> }
> catch (IllegalAccessException e)
> {
> e.printStackTrace();
> }
> catch (ClassNotFoundException e)
> {
> e.printStackTrace();
> }
> try
> {
> this.con = DriverManager.getConnection(this.l1IP, this.l1user,
> this.l1pw);
> }
> catch(SQLException ex)
> {
> ex.printStackTrace();
> System.out.println("SQLException: " +ex.getMessage());
> System.out.println("SQLState: " + ex.getSQLState());
> System.out.println("VendorError: " + ex.getErrorCode());
> }
> }
>
> this.l1user is the DB User und this.l1pw is the password of the user.
>
> And the error message is:
>
> No suitable driver found for <IP>:c:\Vol1\lcs\AUEG\Daten\mand2.GDB
> at java.sql.DriverManager.getConnection(DriverManager.java:602)
> at java.sql.DriverManager.getConnection(DriverManager.java:185)
> at com.inzeit.dbview.DBConnect.connectL1(DBConnect.java:132)
> at com.inzeit.dbview.DBConnect.<init>(DBConnect.java:103)
> at com.inzeit.dbview.DBConnect.main(DBConnect.java:598)
>
> How do i have to build the url to connect to the db-server?
>
> Kind regards,
> Michael
GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl