| Author |
EJB with MSAcsess
|
priya shankar
Ranch Hand
Joined: May 12, 2003
Posts: 51
|
|
Hi all Huv to connect Ebj with MsAccess ..Do we need any special driver... Pls Let me the Details priya
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
I don't know which driver you should use (you can use the JDBC-ODBC bridge but I think that's not of too good quality, though) but I think you should check that you have configured your ODBC correct. Here's a helpful-looking discussion thread on the subject.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
priya shankar
Ranch Hand
Joined: May 12, 2003
Posts: 51
|
|
Thanks Lasse Priya here...I went through the link ,u said..But it explains huv to connect with ordinary java programs..but not with Ejb.. could u suggest some other options priya
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
But it explains huv to connect with ordinary java programs
Oh, I missed that. Well, getting a database connection from an EJB is a FAQ so I'd do a search using keywords "EJB", "DataSource", "connection", and so on. Basically, the steps needed are: 1. Configure a DataSource for your application server to point to the Access database. This procedure will contain defining a JNDI name for the DataSource 2. Configure a resource reference in your EJB's deployment descriptors (ejb-jar.xml and vendor-specific, e.g. weblogic-ejb-jar.xml) 3. Locate the DataSource object with a JNDI lookup and ask for a connection 4. Use the connection as you did in a standalone Java application
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
Only JDBC ODBC bridge can be used to connect to MS access.
|
Groovy
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
Priya, sorry about my somewhat irrelevant first reply. I was responding to another question in the JDBC forum and apparently didn't make the appropriate context switch...
|
 |
 |
|
|
subject: EJB with MSAcsess
|
|
|