Type 1 Jdbc-Odbc Bridge Driver. But forgot to state I am also using JNDI etc. Hence for I need a.jar file. Again you don't need to download any extra driver. Java has included a JDBC/ODBC Bridge driver as a. You also need to download the following Open Source JAR files. Load all the JAR files in the User. 9 - JDBC-ODBC Bridge Driver. The JDBC-ODBC Bridge is a JDBC driver that implements JDBC. (those allowed to write to files) will be able to use the Bridge. Java has included a JDBC/ODBC Bridge driver as a. Download the following Open Source JAR files. This is a commercial JDBC-ODBC Bridge. Download the Microsoft JDBC Driver 6.0 for SQL Server. (JRE) and the associated JDBC API versions are determined by the included JAR files as follows.
posted 13 years agoI have a Tomcat 5.X running and Im trying to connect to a MS Access database, I know I need a JDBC driver from what I can gather from the info I have been reading, my question
i) which driver(s) do I need?
ii) Where do i find them>? I've been on MS's website and all that comes up is a SQL Server 2000 jdbc driver.
Thanks in advance for your time/advice
Regards
Zein
There is one driver that comes with j2sdk. Type 1 Jdbc-Odbc Bridge Driver
Its complete path is...
sun.jdbc.odbc.JdbcOdbcDriver
You need to write following code to make a database connection
dsn you have to create from control panel/odbc.
Naseem
[ June 28, 2006: Message edited by: Naseem Khan ]
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
MySQL and other DB's have drivers, I assumed that MS Access would also have one??
Am on the right lines guys?
Thanks
Zein
Originally posted by Zein Nunna:
Thanks for your reply Naseem, but I mentioned I'm using Tomcat, but forgot to state I am also using JNDI etc.. hence for I need a .jar file that I put in the ...common/lib folder.
MySQL and other DB's have drivers, I assumed that MS Access would also have one??
Am on the right lines guys?
Thanks
Zein
Most people use the JDBC-ODBC bridge, which is built into Java; no seperate driver required.
http://java.sun.com/products/jdbc/faq.html
There are some commercial drivers for MS Access out there; I've never used one and don't know any particular names.
It provides complete description of jndi datasource. Tomcat provides read only jndi datasource object.
You need to expose your dsn by jndi datasource which you can do from your <Context> tag of Server.xml.
Again you don't need to download any extra driver for that irrespective of how you are getting database connection object.
Naseem
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Stu - jdbc-odbc is used when your not using JNDI - hence cant use it now that I am wanting to use JNDI
Naseem - I have followed the Tomcat instructions for configurig JNDI, so changed the web.xml and server.xml accordingly [adding the context tag, then resource etc..] still no luck though.
I have a funny feeling that MS Access is not JNDI compatible - I came across this in another javaranch forum:
If there is anybody out there who has got this combination working [MS Access + Tomcat + JNDI], let me know please. Thanks
Oh btw I'm using Tomcat 5.5
Regards
Sun Jdbc Odbc Bridge Driver Download
How to set up HXTT Access with Tomcat4.1 as PoolableConnection?
But it's a commercial MS Access jdbc driver.
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Add the Context tag in the Server.xml within the <Host> tag.
db1 is data source name which you have to create from control panel.
You don't need to put any entry for jndi in your web.xml.
Now with above Context tag in server.xml, here is a code snippet which will return Connection object from Connection pool.
I tested this on my machine, it worked.
Regards
Naseem
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
I registerd my DB via control panel and the add to systemDSN (this points to the DB on my Tomcat).
The server.xml is as below (keyt snippets)
[the servlet i'm calling is packagless hence ive used '/', the database is in the root/DB folder]
myDB - is my MS Access Database
My serlvet is as below
I still get an error, the log reads as follow:
Any ideas? Thanks in advance for looking at my questions
Regards
Zein
second create user dsn not system dsn.
third why you are not creating a seperate web application for that with following structure....
Waiting for your reply
Naseem
[ June 30, 2006: Message edited by: Naseem Khan ]
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Sorry for the late reply I was away for the weekend
Ok the exact Tomcat is 5.5.17,
Now that I've chnaged the DSN from system to user, I get less errors, the error I do get is as follows:
Does this make sense to anyone? Seems like I've not done something, where the context needs to be set?
Thanks in advance, regards
Zein
1. Context tag in server.xml under <Host> tag
2. db1 user datasource name.
3. Invoke Servlet in /ValidationRND/WEB-INF/classes/com/example
4. Mapped it by url pattern *.servlet in web.xml
This much entry I have made. Nothing else.
If you follow these steps, you will be able to insert the data in database by following url...
http://localhost:8080/test/*.servlet
Naseem
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
In the previous post I noticed a inconsistency, (it might not be!)
db1 = the DSN name,
resource name = TestDB
In your servlet-code you refer to TestDB
?? If you look at one of your above posts, the name of the resource and DSN name were the same?
--------------------------------------------
I still have the problem above outstanding, I'm temporarily using classforname....etc. I still howevere want to solve this JNDI problem.
So just to go through this step by step
<Context path='/test' docBase='F:NaseemKhanj2ee_projectsValidationRND
what is the /test ?? I have the directory name where my web app is, e.g
'/DB', absolute path is C:Program FilesApache Software FoundationTomcat 5.5webappsDB
What abt the docBase?? I have the base directory where all the different web applications i'm working on are
e.g. C:Program FilesApache Software FoundationTomcat 5.5webapps
My resources tag in the server.xml <Resource name='jdbc/db1'...
[is this the dsn-name you give your database resource?]
the url reads --> url= 'jdbc:odbc:db1'
My MS Access database is on my desktop and is added via DSN--> system, called db1 - real file name is testMyDb.mdb [DSN --> system, works for classforname�..]
The servlet code is as follow
It all seems ok to me? Why am I then having a problem? Error is something along the lines of JDBC is not bound in the context.
I�ve been reading the web and people advice to create a file called context.xml � is that necessary?
Is this an environmental problem or a coding problem? I call all my servlets directly by enabling the invoker servlet via conf/web.xml
Thanks in advance for your advice/views
Regards
Zein
[added line breaks so page doesn't wrap]
[ July 06, 2006: Message edited by: Jeanne Boyarsky ]
I have a Tomcat 5.X running and Im trying to connect to a MS Access database, I know I need a JDBC driver from what I can gather from the info I have been reading, my question
i) which driver(s) do I need?
ii) Where do i find them>? I've been on MS's website and all that comes up is a SQL Server 2000 jdbc driver.
Thanks in advance for your time/advice
Regards
Zein
There is one driver that comes with j2sdk. Type 1 Jdbc-Odbc Bridge Driver
Its complete path is...
sun.jdbc.odbc.JdbcOdbcDriver
You need to write following code to make a database connection
dsn you have to create from control panel/odbc.
Naseem
[ June 28, 2006: Message edited by: Naseem Khan ]
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Jdbc Odbc Driver For Ms Access
MySQL and other DB's have drivers, I assumed that MS Access would also have one??
Am on the right lines guys?
Thanks
Zein
Originally posted by Zein Nunna:
Thanks for your reply Naseem, but I mentioned I'm using Tomcat, but forgot to state I am also using JNDI etc.. hence for I need a .jar file that I put in the ...common/lib folder.
MySQL and other DB's have drivers, I assumed that MS Access would also have one??
Am on the right lines guys?
Thanks
Zein
Most people use the JDBC-ODBC bridge, which is built into Java; no seperate driver required.
http://java.sun.com/products/jdbc/faq.html
There are some commercial drivers for MS Access out there; I've never used one and don't know any particular names.
It provides complete description of jndi datasource. Tomcat provides read only jndi datasource object.
You need to expose your dsn by jndi datasource which you can do from your <Context> tag of Server.xml.
Again you don't need to download any extra driver for that irrespective of how you are getting database connection object.
Naseem
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Stu - jdbc-odbc is used when your not using JNDI - hence cant use it now that I am wanting to use JNDI
Naseem - I have followed the Tomcat instructions for configurig JNDI, so changed the web.xml and server.xml accordingly [adding the context tag, then resource etc..] still no luck though.
I have a funny feeling that MS Access is not JNDI compatible - I came across this in another javaranch forum:
If there is anybody out there who has got this combination working [MS Access + Tomcat + JNDI], let me know please. Thanks
Oh btw I'm using Tomcat 5.5
Regards
How to set up HXTT Access with Tomcat4.1 as PoolableConnection?
But it's a commercial MS Access jdbc driver.
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Add the Context tag in the Server.xml within the <Host> tag.
db1 is data source name which you have to create from control panel.
You don't need to put any entry for jndi in your web.xml.
Now with above Context tag in server.xml, here is a code snippet which will return Connection object from Connection pool.
I tested this on my machine, it worked.
Regards
Naseem
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
I registerd my DB via control panel and the add to systemDSN (this points to the DB on my Tomcat).
The server.xml is as below (keyt snippets)
[the servlet i'm calling is packagless hence ive used '/', the database is in the root/DB folder]
myDB - is my MS Access Database
My serlvet is as below
I still get an error, the log reads as follow:
Any ideas? Thanks in advance for looking at my questions
Regards
Zein
second create user dsn not system dsn.
third why you are not creating a seperate web application for that with following structure....
Waiting for your reply
Naseem
[ June 30, 2006: Message edited by: Naseem Khan ]
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Sorry for the late reply I was away for the weekend
Ok the exact Tomcat is 5.5.17,
Now that I've chnaged the DSN from system to user, I get less errors, the error I do get is as follows:
Does this make sense to anyone? Seems like I've not done something, where the context needs to be set?
Thanks in advance, regards
Zein
1. Context tag in server.xml under <Host> tag
2. db1 user datasource name.
3. Invoke Servlet in /ValidationRND/WEB-INF/classes/com/example
4. Mapped it by url pattern *.servlet in web.xml
This much entry I have made. Nothing else.
If you follow these steps, you will be able to insert the data in database by following url...
http://localhost:8080/test/*.servlet
Naseem
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
In the previous post I noticed a inconsistency, (it might not be!)
db1 = the DSN name,
resource name = TestDB
In your servlet-code you refer to TestDB
?? If you look at one of your above posts, the name of the resource and DSN name were the same?
--------------------------------------------
I still have the problem above outstanding, I'm temporarily using classforname....etc. I still howevere want to solve this JNDI problem.
So just to go through this step by step
<Context path='/test' docBase='F:NaseemKhanj2ee_projectsValidationRND
what is the /test ?? I have the directory name where my web app is, e.g
'/DB', absolute path is C:Program FilesApache Software FoundationTomcat 5.5webappsDB
What abt the docBase?? I have the base directory where all the different web applications i'm working on are
e.g. C:Program FilesApache Software FoundationTomcat 5.5webapps
My resources tag in the server.xml <Resource name='jdbc/db1'...
[is this the dsn-name you give your database resource?]
the url reads --> url= 'jdbc:odbc:db1'
My MS Access database is on my desktop and is added via DSN--> system, called db1 - real file name is testMyDb.mdb [DSN --> system, works for classforname�..]
The servlet code is as follow
It all seems ok to me? Why am I then having a problem? Error is something along the lines of JDBC is not bound in the context.
I�ve been reading the web and people advice to create a file called context.xml � is that necessary?
Is this an environmental problem or a coding problem? I call all my servlets directly by enabling the invoker servlet via conf/web.xml
Thanks in advance for your advice/views
Regards
Zein
[added line breaks so page doesn't wrap]
[ July 06, 2006: Message edited by: Jeanne Boyarsky ]