tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: Using servlet and mysql
Date Tue, 29 May 2007 12:38:08 GMT
I would actually recommend steering clear of the jdbc-odbc bridge
driver.  It's not stable enough for production use on any level.

Get MySQL (it's free), install it, configure it according to the docs
and setup your db there.  Docs are plentiful on the mysql website.  You
will be much happier with the end result.


De Haan Software Engineering wrote:
> Access databases can only be accessed by ODBC (default present at 2000
> / XP). MySQL has nothing to do with it.
> 1)  First create your Access database (.mdb, I don't know what a Works
> database is?). It may be placed anywhere on your Tomcat Server.
> 2) Then configure it for usage by ODBC. Click Start -> Run:
> %SystemRoot%\system32\odbcad32.exe
> In the tab System-DSN make a new entry (I hope I translate well from
> Dutch here).
> 2a)  Give the entry a free-choosable unique name, for instance
> 'MyDatabase'
> 2b) Specify the path to the database you created in step 1)
> 3) Attach to the driver using:
> // Load the driver, at some Virtual Machines
> // newInstance() appears to be necessary
> Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ).newInstance();
> 4) Connect to the database using:
> Connection newConnection = DriverManager.getConnection(
> "jdbc:odbc:MyDatabase" );
> Note: Microsoft - as usual - implemented some differences in SQL-syntax!
> Sije de Haan,
> Netherlands
> At 09:59 29-5-2007, you wrote:
>> Hi,
>> This is getting more confusing, you mentioned earlier that you're
>> using MySQL but now it is a Microsoft Works Database. Hmmm perhaps
>> i'm missing something?
>> Anyway, if the database you're using is something like an Access
>> database, you'll just need to use the correct driver and point the
>> URL to your database file. Can't help you here coz i never tried that
>> before (Access is like from another world to me). Perhaps you should
>> try other mailing list, and not Tomcat's.
>> HTH
>> FooShyn
>> Teh Noranis Mohd Aris wrote:
>>> Yes, the login name and password are correct. I created the database
>>> name, teh, with field username and password, using Microsoft Works
>>> Database and saved it in directory catalina_home\webapps\ROOT\. I'm
>>> not sure whether it is the correct directory to
>> put the database. However, in the program there was a statement
>> .....(insert into login_table values(?,?)"); I do not understand the
>> usage of login_table. Does it mean that I should create login_table
>> in database teh? Really need to get this working to
>> day. Please help. Thank you.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message