Subject RE: [Firebird-Java] Re: Failure on PreparedStatement
Author Robert DiFalco
public class ConnectionFactory
{
private static String url = null;

public static Connection createInstance() throws Exception
{
java.util.Properties info = new java.util.Properties();
info.put( "user", ... );
info.put( "charSet", "UTF8" );
if ( url == null )
{
// Class.forName( "interbase.interclient.Driver" );
// url = PropertyExpander.expandString(
"jdbc:interbase://localhost/${tw.home}/data/database/space.fdb" );

Class.forName( "org.firebirdsql.jdbc.FBDriver" );
url = PropertyExpander.expandString(
"jdbc:firebirdsql:localhost/3050:${tw.home}/data/database/space.fdb" );
}

info.put( "password", ... );

Connection con = DriverManager.getConnection( url, info );
con.setAutoCommit( false );
return con;
}
}


-----Original Message-----
From: Roman Rokytskyy [mailto:rrokytskyy@...]
Sent: Friday, April 04, 2003 12:38 PM
To: Firebird-Java@yahoogroups.com
Subject: [Firebird-Java] Re: Failure on PreparedStatement


> Sorry, results are exactly the same with the latest version of the
> driver -- 2/5/2003.

Ok, one more question - how do you create your connections? Can I
assume, that code in your ConnectionFactory is similar to obtaining a
connection from DriverManager?

Thanks!
Roman