|
-
September 23rd, 1999, 01:46 PM
#1
Servlet: Problem connecting database
I am trying to connect to database using JdbcOdbc driver in the init mathod of a Servlet. I have tested the connection writting a test java code. Connection is ok. But while executing Servlet it gives error:
SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
===================================
con = DriverManager.getConnection"jdbc dbc:MPRDB","tstmgr", "pass");
==================================
Help me
-Kaushik
-
October 7th, 1999, 01:15 PM
#2
Re: Servlet: Problem connecting database
Can you post the sequence of exceptions? (the chain of nested exceptions traced up to your function call).
The immediate thing that I can think of is, check your DSN to make sure if it is okay. However, since you say you tried a test program and it works, it is unlikely to have any problem with data source.
-Amaresh
-
January 31st, 2000, 03:55 AM
#3
Re: Servlet: Problem connecting database
Hi!
I am also facing the same problem. I think it is due to configuration. I am using IIS Web Server , JRUN engine. If your problem
is solved? can you please let me know also. It will be realy helpfull for me. sice i am trying this for past two days.
Regards
Sami
[email protected]
-
January 31st, 2000, 10:06 AM
#4
Re: Servlet: Problem connecting database
In "con = DriverManager.getConnection"jdbc dbc:MPRDB","tstmgr", "pass");"
Put a parenthesis after getConnection. It must have have been a typo but just in case....
Which database are you connecting to ? If you connect to MS Access, say, then you will have to create a profile in the ODBC datasource on the server where you are keeping the servlet.(I presume you are using a NT Server) Did you create a profile for MPRDB ?
Give the exact piece of code that you are using to connect to the database (class.forName(..), con = DriverManager.get...) and the exception messages.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|