• 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

exception while running my first jdbc code

 
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have make database in my microsoft sql server and created tables and all , then i test the connection in the odbc data source administrator it gives me succesfull result ( ms normally as we do in sql server ) ...thinks are fine till this
then i have coded my first jdbc code where i m selecting all the values in my emp table which is in emp database.

this code gives me an exception which is

 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You spelled the class's name incorrectly. Check it against your original code sample. (Capitals are important, Java is case-sensitive.)
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:You spelled the class's name incorrectly. Check it against your original code sample. (Capitals are important, Java is case-sensitive.)


where i have spelled the class name incorrectly can you tel me please ?
the same code was running fine when mine ma'am is teaching us in class
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's only one possibility. It's here:

You have some online information? Just copy the class name from there and paste it next to what you have. See the difference?
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:There's only one possibility. It's here:

You have some online information? Just copy the class name from there and paste it next to what you have. See the difference?


i have changed to this


and one more thing i have installed sql server driver 3.0 i have installed in and set the class path in the system and ide also
now my code looks like

and the exception now is

even though i have the latest JRE ie jre 6 update 26
now whats the problem can you tell me ???
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand why you ask "what is the problem". You have an error message which tells you exactly what the problem is. Not only that,
it tells you what you must do to fix the problem.

Asking people to read and interpret error messages for you isn't going to be a good strategy for getting ahead. In future I recommend that you
read the error messages for yourself. If you don't understand an error message, then go ahead and ask a specific question about the error
message.
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:I don't understand why you ask "what is the problem". You have an error message which tells you exactly what the problem is. Not only that,
it tells you what you must do to fix the problem.

Asking people to read and interpret error messages for you isn't going to be a good strategy for getting ahead. In future I recommend that you
read the error messages for yourself. If you don't understand an error message, then go ahead and ask a specific question about the error
message.


ya i understand that the errror message is prety much straight but what i m saying is i hav ethe latest JRE then why this problem is occuring
i have checked my java version it is JRE 6 update 26 which is a latest version i guess ?
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you reading the same error message that we are reading?

Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic