• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

url for datasource (urgent)

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 = "jdbc:odbc://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).]
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).]
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, when we create a FAQ for this topic, this is going to be the number one question:
"jdbc:odbc://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:odbc:OdbcName"

[This message has been edited by Thomas Paul (edited December 21, 2000).]
 
t attarde
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 161
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic