Subject Re: [IB-Java] Can't Establish Interbase Connection
Author David Jencks
Is firebird/interbase running on every machine and is the db
d:/ELSTO_OFFLINE.gdb on every machine? That is what your url assumes.

david jencks

On 2002.01.10 03:35:03 -0500 Sugimin wrote:
> Hi all,
>
> I have problem with establishing interbase connection, the InterClient
> driver
> did successfully registered, but when trying to get a connection, The
> ServerTimeoutException is thrown. I've tried to run the program below on
> several PCs, the weird thing is that the error doesn't occur on every PC.
> did I miss something?
>
> Any help are appreciated. TIA
>
> Sugimin
>
> //***** Sample Program
>
> import java.io.*;
> import java.sql.*;
>
> public class IBConnection {
>
> public IBConnection() {
> }
>
> public static void main(String[] args) {
> try {
> String driver = "interbase.interclient.Driver";
> String url = "jdbc:interbase://localhost/d:/ELSTO_OFFLINE.gdb";
> String username = "sysdba";
> String password = "masterkey";
> Class.forName(driver); //OK
>
> DriverManager.setLoginTimeout(60);
> DriverManager.setLogWriter(new PrintWriter(System.out));
>
> //Error here
> Connection c = DriverManager.getConnection(url,username,password);
> System.out.println ("got connection");
> c.close ();
> } catch (Exception e) {
> e.printStackTrace(System.out);
> }
> }
> }
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
> <HTML>
> <HEAD>
> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
> <META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2650.12">
> <TITLE>Can't Establish Interbase Connection</TITLE>
> </HEAD>
> <BODY>
>
>
>
> <P><FONT SIZE=2>Hi all,</FONT>
> </P>
>
> <P><FONT SIZE=2>I have problem with establishing interbase connection,
> the InterClient driver</FONT>
> <BR><FONT SIZE=2>did successfully registered, but when trying to get a
> connection, The ServerTimeoutException is thrown. I've tried to run the
> program below on several PCs, the weird thing is that the error doesn't
> occur on every PC. did I miss something?</FONT></P>
>
> <P><FONT SIZE=2>Any help are appreciated. TIA</FONT>
> </P>
>
> <P><FONT SIZE=2>Sugimin</FONT>
> </P>
>
> <P><FONT SIZE=2>//***** Sample Program</FONT>
> </P>
>
> <P><FONT SIZE=2>import java.io.*;</FONT>
> <BR><FONT SIZE=2>import java.sql.*;</FONT>
> </P>
>
> <P><FONT SIZE=2>public class IBConnection {</FONT>
> </P>
>
> <P><FONT SIZE=2>  public IBConnection() {</FONT>
> <BR><FONT SIZE=2>  }</FONT>
> </P>
>
> <P><FONT SIZE=2>  public static void main(String[] args) {</FONT>
> <BR><FONT SIZE=2>    try {</FONT>
> <BR><FONT SIZE=2>      String driver =
> "interbase.interclient.Driver";</FONT>
> <BR><FONT SIZE=2>      String url =
> "jdbc:interbase://localhost/d:/ELSTO_OFFLINE.gdb";</FONT>
> <BR><FONT SIZE=2>      String username =
> "sysdba";</FONT>
> <BR><FONT SIZE=2>      String password =
> "masterkey";</FONT>
> <BR><FONT SIZE=2>      Class.forName(driver);
> //OK</FONT>
> </P>
>
> <P><FONT SIZE=2>     
> DriverManager.setLoginTimeout(60);</FONT>
> <BR><FONT SIZE=2>     
> DriverManager.setLogWriter(new PrintWriter(System.out));</FONT>
> <BR>       
> <BR><FONT SIZE=2>//Error here    </FONT>
> <BR><FONT SIZE=2>      Connection c =
> DriverManager.getConnection(url,username,password); </FONT>
> <BR><FONT SIZE=2>      System.out.println
> ("got connection");</FONT>
> <BR><FONT SIZE=2>      c.close ();</FONT>
> <BR><FONT SIZE=2>    } catch (Exception e) {</FONT>
> <BR><FONT SIZE=2>     
> e.printStackTrace(System.out);</FONT>
> <BR><FONT SIZE=2>    }</FONT>
> <BR><FONT SIZE=2>  }</FONT>
> <BR><FONT SIZE=2>}</FONT>
> </P>
>
>
>
> <br>
> <tt>
> To unsubscribe from this group, send an email to:<BR>
> IB-Java-unsubscribe@egroups.com<BR>
> <BR>
> </tt>
> <br>
>
> <br>
> <tt>Your use of Yahoo! Groups is subject to the <a
> href="http://docs.yahoo.com/info/terms/">Yahoo! Terms of
> Service</a>.</tt>
> </br>
>
> </BODY>
> </HTML>