User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 455,969 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,760 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 4306 | Replies: 4
Reply
Join Date: Nov 2007
Posts: 39
Reputation: boyz has a little shameless behaviour in the past 
Rep Power: 0
Solved Threads: 0
boyz boyz is offline Offline
Light Poster

Help how to connect java database MS access

  #1  
Nov 22nd, 2007
plz give me one example and how to generate Driver of data base
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2007
Location: Home
Posts: 2,451
Reputation: zandiago is on a distinguished road 
Rep Power: 6
Solved Threads: 24
Featured Poster
zandiago's Avatar
zandiago zandiago is offline Offline
Nearly a Posting Maven

Re: how to connect java database MS access

  #2  
Nov 22nd, 2007
I shot the sheriff....but I didn't shoot the deputy
Reply With Quote  
Join Date: Aug 2007
Posts: 74
Reputation: lookof2day is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 9
lookof2day lookof2day is offline Offline
Junior Poster in Training

Re: how to connect java database MS access

  #3  
Nov 22nd, 2007
Database drivers (jdbc,odbc,.net...) are provided by database vendors or third party vendors and not generated. JDBC drivers are loaded into the JVM at runtime.

Please refer some books on JDBC Connectivity
Reply With Quote  
Join Date: Feb 2007
Posts: 3
Reputation: muthulakshmil is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
muthulakshmil muthulakshmil is offline Offline
Newbie Poster

Re: how to connect java database MS access

  #4  
Nov 23rd, 2007
to connect ms access with java
you have to datasource name

and write this code in ur program

Connection con=null;
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbcSN name");
Statement stmt=con.createStatment();
ResultSet rs=stmt.executeQuery("select * from tablename");
while(rs.next())
{
System.out.println(rs.getSting("username"); //here username is the field name
}
Reply With Quote  
Join Date: Apr 2007
Location: Richmond, BC, Canada
Posts: 44
Reputation: 7arouf is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
7arouf 7arouf is offline Offline
Light Poster

Re: how to connect java database MS access

  #5  
Nov 27th, 2007
the very first thing you need to do is to go to Control Panel --> adminstrative tools
then select the driver, and then your database

then you can write the code above mentioned in the reply above..
i guess that's pretty much it
oOLebanonOo
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 9:11 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC