• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

connectivity between java and ms access

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
Can any one please tell me how can i connect jdk1.3 to ms acces as back end
thanks in advance
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your question is one that many people have asked. You are not alone. Try doing a search in this forum on "bridge" or "Access" and you will certainly find what you are looking for.
 
dhirajsrivastava
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
can any one please give me the code for connectivity b/w java and ms access
and please specify the driver for this purpose
thanks
dhiraj
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will send u the program tomorrow.
regards,
kichu.
 
kichu kichu
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai,
Sorry for the delay.Here is what u want.I have given below the getconnection java file.
dsn stands for Data Source Name.(Specify your dsn here).
package packagename;
import java.sql.*;
public class getconnection
{
public Connection getconnection(String dsn)
{
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc dbc:"+dsn;
Connection con=DriverManager.getConnection(url);
return con;
}
catch(ClassNotFoundException e)
{
System.out.println("class not found....");
return null;
}
catch(SQLException se)
{
System.out.println("unable to connect");
return null;
}
}
}

When u call this file from the jsp page,do the following.The code below has to be given in the jsp page.
*****************************************************************
getconnection gc=new getconnection();
Connection con=gc.getconnection(dsn);
*****************************************************************
This will pass dsn(Your data source name) to the java file.
regards,
kichu.
once again ,sorry for the delay!!!
[This message has been edited by kichu kichu (edited May 20, 2001).]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic