473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Accessing MS-Access from Solaris and AIX

Hi:
I am using Sun JdbcOdbcDriver to access MS-Access from Java client on
Windows platform. We are in the process of migrating from Win to
Solaris and AIX platform. MS-Access will continue to reside on Win
platform. How can I access MS-Access from Java client on Solaris and
AIX? Can I still use Sun JdbcOdbcDriver?. What drivers or files do I
need on Solaris and AIX platforms? If Sun JdbcOdbcDriver for MS-Access
is not possible on these platforms, please let me know alternatives.
(I can't change database product)

Thanks,
Vasanth
Nov 13 '05 #1
4 4425
bv*********@rediffmail.com (Vasanth) wrote:
I am using Sun JdbcOdbcDriver to access MS-Access from Java client on
Windows platform. We are in the process of migrating from Win to
Solaris and AIX platform. MS-Access will continue to reside on Win
platform. How can I access MS-Access from Java client on Solaris and
AIX? Can I still use Sun JdbcOdbcDriver?. What drivers or files do I
need on Solaris and AIX platforms? If Sun JdbcOdbcDriver for MS-Access
is not possible on these platforms, please let me know alternatives.


If it's read only the following might work.

MDB Tools is a set of libraries and utilities to facilitate exporting data from MS
Access databases (mdb files) without using the Microsoft DLLs. In other words they
are reverse engineering the layout of the MDB file. mdbtools.sourceforge.net

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #2
Here is a snipet from a class I wrote in Java which interfaces with MS
Access. Most of it is probably gobbledeegupe for your purposes. But
there is a connection string in here that might be of interest to you,
and I am also using the Sun ODBC driver to connect to Access. Note:
you have to create a DSN for this to work. The rest of the variables
are just Java objects for Recordsets and Query statements. Also, a lot
of the code lines here are wordwrapping. In Java, the end of a code
line is defined by a semicolon ";", and routines are enclosed in curly
braces {}.
package bugs3;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.net.*;
import java.sql.*;

public class DBFunctionServ extends HttpServlet {
private static final String CONTENT_TYPE = "text/html";
//Initialize global variables
public void init() throws ServletException {
}
//Process the HTTP Get request
public void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
doPost(request, response);
}
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
String btn = request.getParameter("btn");
String priority = request.getParameter("priority");
String status = request.getParameter("status");
String hours = request.getParameter("hours");
int hour = 0;
int submitterID = 0;
int rowcount = 0;
if(hours == null)
hours = "0";
try{
hour = Integer.parseInt(hours);
}catch(NumberFormatException nfe){}
String description = request.getParameter("description");
String submitter = request.getParameter("submitter");
if(submitter == null)
submitter = "0";
try{
submitterID = Integer.parseInt(submitter);
}catch(NumberFormatException nfe){}

if(priority == null)
priority = "";
if(status == null)
status = "";
if(description == null)
description = "";

String bgcolor = null;
Cookie[] cookies = request.getCookies();
if(cookies != null){
for (int i=0; i<cookies.length; i++ ){
Cookie cookie = cookies[i];
if (cookie.getName().equals("bgcolor") ){
bgcolor = cookie.getValue();
System.out.println("bgcolor is " + bgcolor);
}
}
}
//BugDB is the ODBC DSN set in control pannel
String dsn = "jdbc:odbc:;DRIVER=Microsoft Access Driver
(*.mdb);DBQ=BugsDB";
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
out.println("<html>");
out.println("<head><title>DBFunctionServ</title></head>");
if(bgcolor != null)
out.println("<body bgcolor=" + bgcolor + ">");
else
out.println("<body>");
try{
Class.forName(driver);
Connection con;
con = DriverManager.getConnection(dsn);
Statement stmt =
con.createStatement(ResultSet.TYPE_SCROLL_INSENSIT IVE,ResultSet.CONCUR_R
EAD_ONLY);
if(btn.equals("Display") || btn.equals("Find"))
{
String sql = "SELECT * FROM BugsTbl";
if(btn.equals("Find"))
sql = "SELECT * FROM BugsTbl WHERE Priority = '" + priority +
"'";
ResultSet rs = stmt.executeQuery(sql);
//rs.setFetchDirection(rs.TYPE_SCROLL_INSENSITIVE);

rs.last();
rowcount = rs.getRow();
rs.beforeFirst();

ResultSetMetaData md = rs.getMetaData();
int nFields = md.getColumnCount();
//out.println("<html>");
//out.println("<head><title>DBFunctionServ</title></head>");
//if(bgcolor != null)
// out.println("<body bgcolor=" + bgcolor + ">");
//else
// out.println("<body>");
out.println("column count is " + nFields + "<br><br>");
out.println("<table border=1>");
for(int i = 1; i <= nFields; i++)
{
String str1 = md.getColumnName(i);
System.out.print(" *" + str1 + "* ");
out.println("<th>" + str1 + "</th>");
}
out.println("<th>RowCount</th>");
System.out.println("\n");
while(rs.next())
{
out.println("<tr>");
for(int i=1; i <= nFields; i++)
{
String str1 = rs.getString(i);
out.println("<td>" + str1 + "</td>");
}
out.println("<td>" + rs.getRow() + "</td>");
out.println("</tr>");
}
//int rowcount = rs.getRow();
out.println("</table><br>");
if(btn.equals("Find")){
if(priority.equals(""))
out.println("no records to display for selected priority
parameter of *" + priority + "*");
else
out.println("<br>Count of rows is " + rowcount + " for the
priority parameter of *" + priority + "*");
}else
out.println("Count of records is " + rowcount);
}
else
{
if(btn.equals("Add")){
stmt.executeUpdate("INSERT INTO BugsTbl(Priority, Status,
Hours, Description, SubmitterID) "
+ "VALUES('" + priority + "', '" + status +
"', " + hour + ", '"
+ description + "', " + submitterID + ")");
out.println("record added");
}
if(btn.equals("Remove")){
stmt.executeUpdate("DELETE FROM BugsTbl WHERE Hours = " +
hour);
out.println("Record removed for Hours = " + hour);
}
if(btn.equals("Update")){
stmt.executeUpdate("Update BugsTbl Set Description = '" +
description + "' WHERE BugsID = " + hour );
out.println("Record updated for BugsID = " + hour);
}
}
//out.println("<p>The servlet has received a POST. This is the
reply.</p>");
//out.println("</body></html>");
con.close();
System.out.println("btn is " + btn);
}catch(Exception e){e.printStackTrace();}
//out.println("<p>The servlet has received a POST. This is the
reply.</p>");
out.println("</body></html>");
}
//Clean up resources
public void destroy() {
}
}

Rich

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3
bv*********@rediffmail.com (Vasanth) wrote in
news:4a*************************@posting.google.co m:
I am using Sun JdbcOdbcDriver to access MS-Access from Java client
on Windows platform. We are in the process of migrating from Win
to Solaris and AIX platform. MS-Access will continue to reside on
Win platform. How can I access MS-Access from Java client on
Solaris and AIX? Can I still use Sun JdbcOdbcDriver?. What drivers
or files do I need on Solaris and AIX platforms? If Sun
JdbcOdbcDriver for MS-Access is not possible on these platforms,
please let me know alternatives. (I can't change database product)


You're not using Access.

You're using Jet, the database engine behind Access.

You may have used Access to create the MDB file you are using, but
if it's not on Windows, then Access is not involved.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #4
There will be no problems with the migration, provided that you can
physically see the Access mdb files after the move. You can do this
in many different ways including NFS, Samba, or just doing regular
ftp's of the file. Your client side Java will be able to access the
mdb file through the bridge just as it did under Windows. Let me know
if you have problems.

bv*********@rediffmail.com (Vasanth) wrote in message news:<4a*************************@posting.google.c om>...
Hi:
I am using Sun JdbcOdbcDriver to access MS-Access from Java client on
Windows platform. We are in the process of migrating from Win to
Solaris and AIX platform. MS-Access will continue to reside on Win
platform. How can I access MS-Access from Java client on Solaris and
AIX? Can I still use Sun JdbcOdbcDriver?. What drivers or files do I
need on Solaris and AIX platforms? If Sun JdbcOdbcDriver for MS-Access
is not possible on these platforms, please let me know alternatives.
(I can't change database product)

Thanks,
Vasanth

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: amorphous999 | last post by:
I will be creating a small web site using php/apache/SQL Server running on a Win2000 server. It sounds as if there a number of alternatives for accessing SQL Server: mssql* functions, ADOdb...
6
by: harry | last post by:
Hi ppl I have a question about memory layout of a class. Consider the code below: class Base1 { virtual void f() { cout << "Base1::f" << endl; } virtual void g() { cout << "Base1::g" <<...
4
by: Phil Townsend | last post by:
Are there class libraries available for accessing MySQL DBs from .net? Coming from a SQL Server/MS shop this is a little new to me. Any other resources would be helpful as well... thanks! ...
2
by: Kumar | last post by:
Hi Folks, I have a question regarding my windows c# application. This application just reads MS Excel file and puts the data in to sql server database. In that excel file ,it has one named cell...
4
by: Steve Schroeder | last post by:
See: http://support.microsoft.com/default.aspx?scid=kb;en-us;317719 I can convert the sample code to my needs for the most part, where I'm fuzzy on is: ...
2
by: fripper | last post by:
Suppose I have a textbox that was created in a VB .Net web application in design mode ... the name of the textbox is txtCount and its text property is initially set to 10. Now I go into HTML view...
4
by: SteveT | last post by:
I am wanting to populate several treeviews, one for the <TRs> group and one for the <TGsgroup. Is there a simplier way to populate the Treeview than the one I did below? It seems difficult to...
0
landy
by: landy | last post by:
Hi all! Here is my issue - I have a linux box set up as the server for the external webpage for my organization using apache/PHP to write the pages. I also use MySQL on this box for storing...
19
by: cj | last post by:
I'm getting terrible response times trying to pull data from VFP tables using .net--like 2 minutes! Can someone help? f:\arcust01 currently contains 187,728 records and is indexed on CUSTNO...
10
by: Anton | last post by:
Hi, when accessing a secured 3rd party webservice i'm getting a 401 HTTP Statuscode (unauthorized). When entering the url in a browser and entering the username and password manually, the wsdl is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.