• 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

"Data source name not found and no default driver specified"

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I am new at this forum and i am facing a problem in my project.Actually my project is on SuperMarket where i can add/remove products from database and place orders of customers who are already its member and it also calculates the bill but the problem is when i place id and other details of the customer it should display what are the products he buying and his bill but it displays nothing instead it writes(in General Output section as i m using creator) "Data source name not found and no default driver specified" and i think it is not connected to my database and i dont know how to connect database in 64bit Windows...so please help me as i need to submit my project which should be in execution within 2 days so please reply fast any help will be appreciated by me....Thankyou
 
Ranch Hand
Posts: 119
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should post your code related on how you make connection. From the error message it is basically it cannot connect to the defined datasource name in your program. And it also cannot find the JDBC driver used by your program to connect to a database.
 
swati bathla
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's the code of my jdbc connection-

[Added code tags - see UseCodeTags for details]
 
Wayan Saryada
Ranch Hand
Posts: 119
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can see that you are using the JdbcOdbcDriver from your snippet. Now, have you created the Data Source in the ODBC Data Source manager? What database do you use? Microsoft Access?
 
swati bathla
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it's Microsoft Access
 
Marshal
Posts: 28226
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
And you didn't create an ODBC data source named "NC" on the computer where that code ran, I suppose?
 
swati bathla
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what should i do now as i dont know how to do it?
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In windows 7 you need to look here

Control Panel\System and Security\Administrative Tools

Under the above, you will find the following

ODBC Data Source Administrator

Select MS Access driver and click add, next window should show you the options to enter the dsn name you have used in your code and the access database file it should map too.



 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic