Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help! DriverManager.getConnection problem

 
raj guntupalli
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I to connect to a access databse with a jdbc-odbc bridge it connects fine and everything works out.But when I try to connect the same database from the servlet in my tomacat4.0 DriverManager.getConnection("jdbcdbcD","",""); is not working.Can anyone please help me.bye.
[ December 19, 2002: Message edited by: Thomas Paul ]
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is not working? What error message(s) are you getting?
 
raj guntupalli
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.sql.SQLException
 
Cobras9
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
add the username and password in the last 2 block of apostrophes
coz ur exception is too general and usually this means somehting went wrong in ur sql statement or u might be using a null connection to try and set up a statement.....so many causes that can relate to this SQLException
 
Cobras9
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh i think in tomcat , when u r getting a connection using DriverManager, u suppose to supplie an URL.....something like
"jdbc:informix-sqli://%dbhost%:%portNum/dbname:INFORMIXSERVER=%dbserver%;user=XXXXX;password=XXXXX;"
try this ....but u have to find out what u have to type in the url coz this is for Informix db
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Cobras9",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Please change your display name soon, accounts with invalid display names get deleted
Thanks.
Dave
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Copied from the duplicate thread
Originally posted by raj guntupalli :
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic