Subject Re: [IB-Java] Help on InterClient
Author Hui Chun KIt
Yes, I just did it and it works. Your response is really very fast. Just after I
solve the problem
myself, then I found that you have already answered.. :)
Thx. It's a typo in fact.


Jacky

Joe Shevland wrote:

> Sorry, missed the source code on the first read. The problem is in the
> missing port number after the hostname:
>
> jdbc:interbase://myserver:/opt/interbase/example/employee.gdb
>
> You've written:
>
> //myserver:/
>
> which the Interclient code would parse as being a hostname of 'myserver' and
> a port of '', and '' is definitely not an integer :)
>
> If you omit the colon after the hostname as in:
>
> jdbc:interbase://myserver/opt/interbase/example/employee.gdb
>
> it will work.
>
> Regards,
> Joe
>
> > -----Original Message-----
> > From: Hui Chun KIt [mailto:ckhui@...]
> > Sent: Wednesday, January 24, 2001 3:09 PM
> > To: IB-Java@egroups.com
> > Subject: Re: [IB-Java] Help on InterClient
> >
> >
> > My Connection String is in the source, there's no integer.......
> >
> > Joe Shevland wrote:
> >
> > > What are you using as the connection string? Possibly a TCP port number
> > > that's not an integer?
> > >
> > > Regards,
> > > Joe
> > >
> > > -----Original Message-----
> > > From: ckhui@... [mailto:ckhui@...]
> > > Sent: Wednesday, January 24, 2001 2:10 AM
> > > To: IB-Java@egroups.com
> > > Subject: [IB-Java] Help on InterClient
> > >
> > > Dear all,
> > >
> > > I am running RH7, FireBird 0.94p1 and got the following
> > > exception whenever I tried to run a very very simple java
> > > application which merely open a connection to interserver.
> > > I have tried JDK1.3 and JDK1.2.2 from SUN and both give me the
> > > same result.
> > >
> > > OS: Redhat 7.0 with glibc updated
> > > JDK: JDK1.2.2-fcs / JDK1.3-fcs
> > > IB: FireBird 0.94p1
> > > InterClient,InterServer: 1.60.1
> > > Classpath:/usr/java/jre1.2.2/lib/rt.jar:/usr/interclient/interclient.j
> > > ar:.
> > >
> > > Error:
> > > $java SQLStatement
> > > Exception in thread "main" java.lang.NumberFormatException:
> > > at java.lang.Integer.parseInt(Integer.java:430)
> > > at java.lang.Integer.parseInt(Integer.java:458)
> > > at interbase.interclient.Driver.connect(Unknown Source)
> > > at
> > > java.sql.DriverManager.getConnection(DriverManager.java:457)
> > > at
> > > java.sql.DriverManager.getConnection(DriverManager.java:137)
> > > at SQLStatement.main(SQLStatement.java:24)
> > > $
> > >
> > > Any ideas???
> > >
> > > Jacky Hui
> > >
> > > Source code of my java program.
> > > ----------------------------------------------------
> > > import java.sql.*;
> > >
> > > public class SQLStatement {
> > >
> > > public static void main(String args[]) {
> > >
> > > String databaseURL =
> > > "jdbc:interbase://myserver:/opt/interbase/example/employee.gdb";
> > > String user = "sysdba";
> > > String password = "masterkey";
> > > String driverName = "interbase.interclient.Driver";
> > >
> > > Connection con;
> > > String query = "select * from country";
> > > Statement stmt;
> > >
> > > try {
> > > Class.forName(driverName);
> > >
> > > } catch(java.lang.ClassNotFoundException e) {
> > > System.err.print("ClassNotFoundException: ");
> > > System.err.println(e.getMessage());
> > > }
> > >
> > > try {
> > > con =
> > > DriverManager.getConnection(databaseURL,user,password);
> > > con.close();
> > >
> > > } catch(SQLException ex) {
> > > System.err.print("SQLException: ");
> > > System.err.println(ex.getMessage());
> > > }
> > > }
> > > }
> > >
> > > To unsubscribe from this group, send an email to:
> > > IB-Java-unsubscribe@egroups.com
> > >
> > > To unsubscribe from this group, send an email to:
> > > IB-Java-unsubscribe@egroups.com
> >
> >
> > To unsubscribe from this group, send an email to:
> > IB-Java-unsubscribe@egroups.com
> >
> >
> >
> >
> >
>
> To unsubscribe from this group, send an email to:
> IB-Java-unsubscribe@egroups.com