1,105,633 Community Members

how to connect jsp page with acess databse

Member Avatar
sau_shilpa
Newbie Poster
2 posts since Oct 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi,
When I try to connect a jsp page with MS Access database, it gives an error
"[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified "
What does that means?

Member Avatar
sbhavan
Light Poster
46 posts since Oct 2008
Reputation Points: 30 [?]
Q&As Helped to Solve: 2 [?]
Skill Endorsements: 0 [?]
 
0
 

I assume that you are using JDBC-ODBC Bridge driver to connect to the database using a User DSN.

If it so,

Try using System DSN instead of User DSN.

This may help to solve this. I think so.

If you have not created the DSN, Create the System DSN and then try again.

Member Avatar
stephen84s
Nearly a Posting Virtuoso
1,328 posts since Jul 2007
Reputation Points: 550 [?]
Q&As Helped to Solve: 160 [?]
Skill Endorsements: 13 [?]
Featured
 
0
 

Do not connect to a database directly from within a JSP. JSPs are only for display purposes, your main business logic / database connectivity etc should be performed in Java code which you will include in your JSP and use as a API, So in case if in the future you have to switch from a JSP front end to maybe a Swing front end, you just have to redesign your interface, whereas the code which will be doing the important work of processing your data etc, can be reused without a problem.

Peter has made an excellent thread here on basics of how you should design your web applications, using the MVC architecture.

And you do not always need a DSN to connect to an Access database. But you should clear such concepts when you are working in core Java itself. If you are jumping to JSP without a firm foundation in Core Java, you are bound to spend more time in figuring out basics like this, rather than actually do some web development.

To connect to an MS Access database without a DSN use the following connection string:- jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=PATH_TO_MDB

Member Avatar
vivek_web
Newbie Poster
3 posts since Oct 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi to all im new to this environmnt...i hav an error like this..in jsp..after connectin..it shows "no data found"...?(jsp with access)

Member Avatar
stephen84s
Nearly a Posting Virtuoso
1,328 posts since Jul 2007
Reputation Points: 550 [?]
Q&As Helped to Solve: 160 [?]
Skill Endorsements: 13 [?]
Featured
 
0
 

hi to all im new to this environmnt...i hav an error like this..in jsp..after connectin..it shows "no data found"...?(jsp with access)

Hijacking someone else's thread like this is considered rude, I see you have already started your own thread, have some patience and wait for replies there.

Member Avatar
patel_amul
Newbie Poster
2 posts since May 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi,
when i try to connect a jsp page with ms access database, it gives an error
"[microsoft][odbc driver manager] data source name not found and no default driver specified "
what does that means?

hi you need to check your connection string as well

m.soft dabase odbc driver path or drivers are working in your system well or not?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article