Driver registered using JBDC and IDS2000
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Security, Permissions & Auditing, Java & JDBC Development
The problem seems to be with the url string line, except that the
Jlogin test program avalible from INFORMIX worked correctly and listed
the enclosed url as the one it returned it was using. I know that the
ifxjdbc.jar file can be found because I was able to run JLogin without
having it in the CLASSPATH, nor local directory.
Code fragment:
try
{
try
{
DriverManager.registerDriver((Driver)Class.forName("com.informix.jdbc.If
xDriver").newInstance());
System.out.println("Driver registered");
}
catch (Exception e)
{
System.out.println("ERROR: failed to load Informix JDBC
driver: " + e);
}
conn =
DriverManager.getConnection("jdbc:informix-sqli//yuri:5050/address_book:
INFORMIXSERVER=yuri_online;user=informix;password=<witheld>");}
catch (Exception e)
{
System.out.println("ERROR: failed to connect!" + e); }
}
}
Returns:
Driver registered
ERROR: failed to connect!java.sql.SQLException: No suitable driver
Thanks for your help,
ERIC GANDT
Sent via Deja.com http://www.deja.com/
Before you buy.