If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > JDBC Connectivity to Informix SE 7.25 problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-21-06, 10:24
chazmataz chazmataz is offline
Registered User
 
Join Date: Jul 2006
Posts: 1
JDBC Connectivity to Informix SE 7.25 problem

I am having problems getting the IBM Informix JDBC Driver 3.00.JC3 to connect with Informix SE v7.25.UC6 running on SCO UNIX_SVR5 7.1.1

I have read that to connect with Informix SE, you must fully specify the pathname to the database. All my attempts result in an error "Database not found or no system permission".

The following code allows me to connect to the Informix server but not the database. I get the following error

ERROR: execution failed - statement: database bridgedb;
ERROR: Database not found or no system permission.

I get the same error when trying to use WinSQL to connect to the database if I DON'T set the DBPATH environment variable. As long as I have my DBPATH environment variable set and use Informix's ODBC driver, I am able to connect via WinSQL from the same Windows XP machine but not at all via JDBC.

Any ideas?

Thanks in advance.

Charles


Code follows:

/*
* Created on Jul 18, 2006
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.btci.webservice.meetingexchange;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class MeetingExchangeTest
{
public static void main (String[] args)
{
String cmd = null;
int rc;
Connection conn = null;

try
{
Class.forName("com.informix.jdbc.IfxDriver");
}
catch (Exception e)
{
System.out.println("ERROR: failed to load Informix JDBC driver.");
}
try
{
// String url = "jdbc:informix-sqli://192.168.101.52:1525//usr/dcb/dbase/bridgedb:informixserver=dcbSQL;";
// String url = "jdbc:informix-sqli://192.168.101.52:1525/ /usr/dcb/dbase/bridgedb:informixserver=dcbSQL;";
// String url = "jdbc:informix-sqli://192.168.101.52:1525/usr/dcb/dbase/bridgedb:informixserver=dcbSQL;";
// String url = "jdbc:informix-sqli://192.168.101.52:1525/bridgedb:informixserver=dcbSQL;";
String url = "jdbc:informix-sqli://192.168.101.52:1525:informixserver=dcbSQL;";

conn = DriverManager.getConnection(url, "brdgdbo", "brdgdbo");
}
catch (SQLException e)
{
System.out.println("ERROR: failed to connect!");
e.printStackTrace();
return;
}
try
{
Statement stmt = conn.createStatement();
cmd = "database bridgedb;";

rc = stmt.executeUpdate(cmd);
stmt.close();
}
catch (SQLException e)
{
System.out.println("ERROR: execution failed - statement: " + cmd);
System.out.println("ERROR: " + e.getMessage());
}
}
}
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On