File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes url for datasource (urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "url for datasource (urgent)" Watch "url for datasource (urgent)" New topic
Author

url for datasource (urgent)

t attarde
Greenhorn

Joined: Dec 21, 2000
Posts: 4
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
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
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
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
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).]


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
t attarde
Greenhorn

Joined: Dec 21, 2000
Posts: 4
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
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
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
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...

------------------
Multi-Platform Database Developer
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: url for datasource (urgent)
 
Similar Threads
class not found exception ,open HTTP connection failed
tomcat/iis - not recognizing web.xml file.
How to get all files in a subdirectory of a webpage
db access through applet
weblogic iis plug-in error