Hi All, I've installed IIS server on windowsNT4.0 machine. which automatically create inetpub->wwwroot directory like this c:\inetpub\wwwroot I put my applet and MSAccess database in wwwroot directory. I'm trying to create datasource like this String url = "jdbcdbc://intserv002:80/TimeSheet"; String username = "abc"; String password = "xxx"; Connection con = DriverManager.getConnection(url,username,password); and if try to run this applet from client it gives me rror like this SQL Execption SQL state : IM002 Message : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Vendor : 0 Could anybody please tell me where I'm wrong? Thanks in advance. Trupti [This message has been edited by Thomas Paul (edited December 21, 2000).]
NageswaraRao Karra
Ranch Hand
Joined: Nov 12, 2000
Posts: 34
posted
0
hai! the problem you mentioned is due to nonexistant dsn? have you created dsn? go to control panel-odbc32-click add button -select the driver-mention yr.dsn-choose the database. this will work
t attarde
Greenhorn
Joined: Dec 21, 2000
Posts: 4
posted
0
Hi Karra, Thanks for the help but i've already created User dsn and system dsn pointing to my database. Do i need to do any other settings ? Thanks Trupti
Monty Ireland
Ranch Hand
Joined: Oct 03, 2000
Posts: 161
posted
0
1. Have you added your database driver to your CLASSPATH? 2. Have you used the POLICYTOOL utility yet? Monty ------------------ Multi-Platform Database Developer [This message has been edited by Monty Ireland (edited December 21, 2000).]
Multi Platform Database Developer & DBA on E.S.T.
Thomas Paul
mister krabs
Ranch Hand
Joined: May 05, 2000
Posts: 13974
posted
0
OK, when we create a FAQ for this topic, this is going to be the number one question: "jdbcdbc://intserv002:80/TimeSheet" This is incorrect! You do not specify the database name in the URL when using ODBC. What goes in the URL is the ODBC name that you created when you set up the database in ODBC. The correct format is: "jdbcdbc:OdbcName"
[This message has been edited by Thomas Paul (edited December 21, 2000).]
Hi Monty, I've created the policy file using polivytool but I don't know how to add database driver in classpah. Could you please explain me in detail? Many Thanks, Trupti
Originally posted by Monty Ireland: 1. Have you added your database driver to your CLASSPATH? 2. Have you used the POLICYTOOL utility yet? Monty
t attarde
Greenhorn
Joined: Dec 21, 2000
Posts: 4
posted
0
Hi paul, Thanks for quick reply. But the name which I'm using is not the database name it is the ODBC name that I've created while setting up the database in ODBC. Are there any other mistakes? Please tell me if you notice anything. Thanks Trupti
Originally posted by Thomas Paul: OK, when we create a FAQ for this topic, this is going to be the number one question: "jdbc dbc://intserv002:80/TimeSheet" This is incorrect! You do not specify the database name in the URL when using ODBC. What goes in the URL is the ODBC name that you created when you set up the database in ODBC. The correct format is: "jdbc dbc:OdbcName"
[This message has been edited by Thomas Paul (edited December 21, 2000).]
NageswaraRao Karra
Ranch Hand
Joined: Nov 12, 2000
Posts: 34
posted
0
hai friend, i have tried the same sort of example with IIS and sql server and MSAccess.(not with java)but i think same problem i have used the database examples which are in samples directory as well as Biblio data base of MSAccess. all the same i am getting teh error only when i deleted the dsn purposefully for debugging. ------------------------------------------ SQL Execption SQL state : IM002 Message : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Vendor : 0 --------------------------------------- every time i connected to database with correct dsn i got the result. may this help you
Monty Ireland
Ranch Hand
Joined: Oct 03, 2000
Posts: 161
posted
0
No Problem... I'm using JDK1.3 on an NT box. The jdk is installed in c:\jdk1.3. I put all 3rd party class files in c:\jdk1.3\lib. I use the oracle jdbc driver classes12.zip Here are my system settings. JAVA_HOME=c:\jdk1.3 TOMCAT=c:\tomcat ORACLE=c:\oracle CLASSPATH=c:\jdk1.3\lib\classes12.zip -- jdbc driver Hope this helps...