Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing MS ACCESS [Tomcat SERVER] Problem

 
Mani kan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Actually am creating database web application..i can access the ms access datas when normally am calling an application..once i deploy the WAR file into Tomcat server ..i cannot access the database...


please give me a solution for this issue..


Here my Code:


 
Soumyajit Hazra
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What error or exception are you getting exactly?
Please follow the steps first
1. Check if the "user" DSN is created and pointed to the proper .mdb file
2. Check the tomcat console for any exception
3. Print the Connection object . You should not get null if connection is established.
 
Mani kan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah here connection is not establishing! what i have to do to get rid of this problem? but access path and dsn creation are perfect ?
 
Soumyajit Hazra
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but access path and dsn creation are perfect ?

Please state properly what are the steps you followed to create the DSN. Typically
1. Goto start and control panel. Select administrative tools.
2. In that select DataSources (ODBC).
3. Click on the right side pane.
4. Select the driver as Driver do Microsoft access(*.MDB)
5. Click finish.
6. Goto select and find the databse name on the drive. Select the location.
7. Give Dsn name. Click on ok.
8. Find the Dsn name added to the list.
9. You are done.
above are the steps. Did you ran your java code out of tomcat (not as web app) and still getting same problem? What exception are you getting?
 
Mani kan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no no..normally i can establish the connection after deploying my web app to tomcat server..i cannot create the connection ..thats the problem in my application...


what issue it might be?
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, you really shouldn't be using MS Access with any webserver. It's not safe to use in a multi-threaded environment, and that's just about every web server, and definitely Tomcat.

You should use a database server that runs as a stand-alone application. Popular ones include MySQL, PostgreSQL, Apache Derby, SQLite, IBM DB2, Oracle and others. All the ones listed up to (but not including) DB2 are free open-source products. The others are available in "express" versions for free or as commercial products.

Oh. Forgot one. As long as you're running Windows - and only Windows, there's a version of SQL Server available for free as well. My experience has been that it's better to use the SourceForge JDBC drivers instead of Microsoft's drivers. The MS-supplied drivers were giving me problems on stuff where someone had gone insane on nested transactional stored procedures.
 
rohithsrivardhan reballi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Soumyajit Hazra wrote:
but access path and dsn creation are perfect ?

Please state properly what are the steps you followed to create the DSN. Typically
1. Goto start and control panel. Select administrative tools.
2. In that select DataSources (ODBC).
3. Click on the right side pane.
4. Select the driver as Driver do Microsoft access(*.MDB)
5. Click finish.
6. Goto select and find the databse name on the drive. Select the location.
7. Give Dsn name. Click on ok.
8. Find the Dsn name added to the list.
9. You are done.
above are the steps. Did you ran your java code out of tomcat (not as web app) and still getting same problem? What exception are you getting?

It throws data not found exception
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic