• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sybase -- Insufficient information to connect to the data source

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic