*
The moose likes JDBC and the fly likes Data source name not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Data source name not found" Watch "Data source name not found" New topic
Author

Data source name not found

ankur tyagi
Ranch Hand

Joined: Apr 01, 2009
Posts: 49
I ran this program to check the connection between my tomcat and JDBC
as i was having some problems in my web application..

result is
Good till now
SQLException is this: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified SQLState : IM002 VendorError: 0
Hello World. Sun... 1.4
can someone explain what to do??
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3860


What driver are you using? And did you check the correct URL for your for the DB in the documentation?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3274
    
  52

moving to JDBC forum.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
him jain
Ranch Hand

Joined: Feb 05, 2010
Posts: 56
No, I don't think there's any mistake with the URL. There is problem of system configuration definitely.
I have kept a working code along with configuration here:

http://jainhim.blogspot.com/2010/04/jdbc.html
http://jainhim.blogspot.com/2010/04/configuration-for-jdbc.html

Hope it helped..
Would like to help if still any problem exists.
Also, check your configuration for jdbc if you're using windows.


--Himanshu Jain
http://jainhim.blogspot.com/
ankur tyagi
Ranch Hand

Joined: Apr 01, 2009
Posts: 49
the connection with jdbc was working fine when called from a class..
the problem started only when i started servlet.
previously a servlet was calling a class that had the code to get data from database but because of the problem
i tried putting all the code in the servlet only...
but still there is problem..
help
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2516
    
  10

1: check if you made a system data source, not a user data source
2: switch to Oracle jdbc driver. I don't reccomend using the jdbcodbc driver to connect to Oracle.


OCUP UML fundamental and ITIL foundation
youtube channel
ankur tyagi
Ranch Hand

Joined: Apr 01, 2009
Posts: 49
problem is solved ..
i was using user dsn but after creating a system dsn , its working
thanks every one...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data source name not found