wood burning stoves 2.0*
The moose likes JDBC and the fly likes Sybase -- Insufficient information to connect to the data source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Sybase -- Insufficient information to connect to the data source" Watch "Sybase -- Insufficient information to connect to the data source" New topic
Author

Sybase -- Insufficient information to connect to the data source

Josue Cedeno
Ranch Hand

Joined: Feb 06, 2001
Posts: 71
I'm having a problem with
conn = DriverManager.getConnection( url, props ) ;
I have tried (url) ... (url,<id>,<pwd> ... (url, props) AND I still receive an insufficient information error. Any suggestions? (This is for testing purposes)
Thank you very very much.
Error Message...
creating DB Driver
creating connection
Exception: [MERANT][ODBC Sybase ASE driver]Insufficient information to connect to the data source.
java.sql.SQLException: [MERANT][ODBC Sybase ASE driver]Insufficient information to connect to the data source.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2458)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:320)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:163)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:146)
at JdbcTest3.main(JdbcTest3.java:28)
Code...
import java.sql.*;
import java.util.Properties ;
public class JdbcTest3
{
public static void main( String args[] )
{
java.sql.Connection conn ;
Statement stmt ;
ResultSet rs ;
String queryString ;
queryString = "Select loadDate FROM TblGeriGrossCommDate";

try
{
System.err.println( "creating DB Driver" );
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ;
System.err.println( "creating connection" ) ;
Properties props = new Properties() ;
props.put( "uid", "..." ) ;
props.put( "pwd", "..." ) ;
props.put( "srvr", "..." ) ;
props.put( "driver", "Sybase ASE ODBC Driver" ) ;
props.put( "db", "EQYDB1_DEV" ) ;
String url = "jdbc dbc:EQYDB1_DEV" ;
conn = DriverManager.getConnection( url, props ) ;
System.err.println( "creating statement" ) ;
stmt = conn.createStatement() ;
System.err.println( "executing Statement Query" ) ;
rs = stmt.executeQuery( queryString ) ;
while( rs.next() )
{
System.out.println( rs.getString( "loadDate" ) ) ;
}
System.err.println( "Cleaning up" ) ; // close in reverse order
rs.close() ;
stmt.close() ;
conn.close() ;
}
catch(Exception e)
{
System.err.println( "Exception: " + e.getMessage() ) ;
e.printStackTrace() ;
}
}
}
[ May 15, 2002: Message edited by: Josue Cedeno ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sybase -- Insufficient information to connect to the data source