Subject | Re: [firebird-support] NEWBEE jdbc connect question |
---|---|
Author | Helen Borrie |
Post date | 2003-10-10T09:07:54Z |
Hello Richard,
This list is the database support list. For JBird driver questions, join
the firebird-java group:
<mailto:firebird-java-subscribe@yahoogroups.com>
heLen
At 10:47 AM 10/10/2003 +0200, you wrote:
This list is the database support list. For JBird driver questions, join
the firebird-java group:
<mailto:firebird-java-subscribe@yahoogroups.com>
heLen
At 10:47 AM 10/10/2003 +0200, you wrote:
>Hi all
>
>A slightly stupid question, but it may be so simple that I can't find a
>proper example.
>
>Can some body give me en example of how to execute this statement
>
> select full_name from employee where salary < 50000")
>
>with this jdbc driver
>
> org.firebirdsql.jdbc.FBDriver
>
>
>this is what I tried
>
>Connection con;
>String databaseURL =
>"jdbc:firebirdsql:192.168.0.115/3050:/home/firebird/data/employee.fdb";
>
>String user = "sysdba";
>
>String password = "pass";
>
>//String driverName = "org.firebirdsql.jdbc.FBDriver";
>
> //Load driver
>Class.forName("org.firebirdsql.jdbc.FBDriver");
>
>//Attempt to connect to a driver.
>con = DriverManager.getConnection(databaseURL, user, password);
>
>//Create a Statement object
>stmt = con.createStatement();
>
>result = stmt.executeQuery ("select full_name from employee where salary <
>50000");
>
>and this is his error
>
>org.apache.jasper.JasperException: Unable to compile class for
>JSP/usr/java/jakarta-tomcat-3.2.3/work/192.10.10.20_8080/_0002fconnect_00033
>_0002ejspconnect3_jsp_12.java:83: Undefined variable: stmt
> stmt = con.createStatement();
> ^
>/usr/java/jakarta-tomcat-3.2.3/work/192.10.10.20_8080/_0002fconnect_00033_00
>02ejspconnect3_jsp_12.java:85: Undefined variable: result
> result = stmt.executeQuery ("select
>full_name from employee where salary < 50000");
> ^
>/usr/java/jakarta-tomcat-3.2.3/work/192.10.10.20_8080/_0002fconnect_00033_00
>02ejspconnect3_jsp_12.java:85: Undefined variable or class name: stmt
> result = stmt.executeQuery ("select
>full_name from employee where salary < 50000");
>
>
>Thanks for your help
>
>
>Richard Drent
>
>
>
>
>
>
>
>
>
>To unsubscribe from this group, send an email to:
>firebird-support-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/