Share on Google+Share on Google+

SakthiPrabhu.g
Connection on MsAccess
1 Answer(s)      8 years ago
Posted in : Java Beginners

Ads

View Answers

December 20, 2008 at 3:58 AM


Hi friend,

Code to help in Connectivity in MS Access :

import java.sql.*;

public class MSaccessConnect
{
public MSaccessConnect()
{
}

public Connection getConnection()
{
Connection con=null;

// Loading driver
try {
String url = "jdbc:odbc:credit";

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver" );

con = DriverManager.getConnection( url );
}
catch ( ClassNotFoundException cnfex ) {
cnfex.printStackTrace();
}
catch ( SQLException sqlex ) {
sqlex.printStackTrace();
}
catch ( Exception excp ) {
excp.printStackTrace();
}

return con;
}

}


Thanks











Related Tutorials/Questions & Answers:
Connection on MsAccess - Java Beginners
Connection on MsAccess  Hi friend.. This is the code .... I have to connect this program to MsAcces.. What s d Procedure to do? when i click... Connection getConnection() { Connection con=null; // Loading driver try
Connection
Connection  What is Connection
Advertisements
connection
connection   how to make multiple database connection using jdbc
connection
the connection with the available port on the host machine: import java.net.... the connection was not established. Predict the output of the preceding code. Explain why the connection cannot be established
get data between date using jsp with msaccess
get data between date using jsp with msaccess  hi, urgently i need program for get data between date using jsp with MsAccess database.plz any one can help me.thanks for anyone replay with regards c.b.chellappa
create bar chart in jsp using msaccess database
create bar chart in jsp using msaccess database  type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception
create bar chart in jsp using msaccess database
create bar chart in jsp using msaccess database  thanks for reply, that code i can use but i get the below error, pls help me message description The server encountered an internal error () that prevented it from
get data between date from msaccess database
get data between date from msaccess database  here is my code, i want to get data between date using jsp with msaccess.i stored date into database in string.when i got output it displayed before month data
how to create bar chart in jsp using msaccess database
how to create bar chart in jsp using msaccess database  type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception
Connection pooling
Connection pooling  What is Connection pooling
connection closing
connection closing  hello, what happens if connection is not closed
How to insert multiple checkboxes into Msaccess database J2EE using prepared statement - Java Beginners
How to insert multiple checkboxes into Msaccess database J2EE using prepared statement  Dear Experts, Tried as I might looking for solutions..."); Connection conn =DriverManager.getConnection("jdbc:odbc:access
Connection pooling
Connection pooling  hii, What is Connection pooling?   hello, Connection pooling is a technique used for sharing server resources among requesting clients. Connection pooling increases the performance of Web
DataBase Connection
DataBase Connection  How to connect java and Oracle 10g? Tell me Jdbc connection
JDBC Connection and Registration
JDBC Connection and Registration   How to create a JDBC connection to MSAccess. How to create a table in MSAccess Manually, like going and opening MSAccess and creating column names. How to store data into the above manually
connection - JNDI
connection   Hi, i am getting this error,can any one know pls give me reply org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool exhausted  Hi friend, Plz give full details with source
Connection pooling
Connection pooling  Sir, In my project i want to implement connection pooling with ms-sql server 2005. i wrote the code in JSP like this... <% Connection con=DbCon.getConnection(); Statement stmt
connection - SQL
connection  how can i establish connection between netbean_ide6.9 with mysql or oracle  Hi Friend, Please visit the following link: http://www.roseindia.net/jsf/visual-jsf.shtml Hope that it will be helpful
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...("password","tiger"); Connection con=d.connect(s,p); Statement st... the connection
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...("password","tiger"); Connection con=d.connect(s,p); Statement st... the connection
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...("password","tiger"); Connection con=d.connect(s,p); Statement st... the connection
Connection to Database
Connection to Database  Hello, I have a website with more than 50.... However, most of times my web pages displays the error message" Too many Connection... and viewing hundreds of pages, I wont get any connection error and the truth
jdbc connection
{ Class.forName("com.mysql.jdbc.Driver"); Connection con = (Connection..."); Connection con = (Connection) DriverManager.getConnection("jdbc:mysql://127.0.0.1
connection in php
connection in php  <?php include("include/db.php"); ?> <html> <head> <title>Mann Jewellary</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <
connection in php
connection in php  <?php include("include/db.php"); ?> <html> <head> <title>Mann Jewellary</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <
connection in php
connection in php  <?php include("include/db.php"); ?> <html> <head> <title>Mann Jewellary</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <
Connection Pool
Connection Pool  <?php /*******************************************/ /* FaTaLisTiCz_Fx Fx29Sh v1 06.2008 */ /* Re-coded and modified By McN Community */ /* McN Community
Tutorials   
Java Spring Hibernate Struts Training Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include? java What are some way to learn Java quickly? Is it required to learn Java before learning Java Script? Is it necessary to learn java script before learning PHP? Are HTML5 and Java Script boosts Java career? Is Java object oriented? Fingerprint application with Java Uninstall Oracle Virtual Box JSON to HashMap Free Java online Training I want example of Control Statement in Java ANSI Color Codes with Python Create a Program that Calculates Input What is difference between JDK,JRE and JVM? How to see ubuntu version on server? How to get Page Source in Selenium (WebDriver) using Java? The path to the driver executable must be set by the webdriver.gecko.driver system property parse data from a link in java Java Program Qns using BlueJ How to fix HAX Kernel Module Is Not Installed error? Installing Audacity Looking for code Logic to check track changes & Coments in MSWord, MSWordx, MSExcel, MSExcelx is ON/OFF Installing JDK on Mac SAX Parser exception ERROR 601 (42P00): Syntax error. Encountered Thread java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory How to install Ubuntu 16.04 LTS? HttpServletRequest cannot be resolved to a type in eclipse - Solved Unhandled event loop exception GC overhead limit exceeded Spring Data jpa with apache phoenix Caused by: java.lang.IllegalArgumentException: Not a host:port pair: PBUF o.a.h.h.z.RecoverableZooKeeper - Possibly transient ZooKeeper, quorum= com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager class not found com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager not found How to download and install Java 8 on Windows? How to uninstall JDK 7? How to install gtk-doc-tools package in Ubuntu? How to install Oracle JDK 8 on Ubuntu? ejabberd_ctl.beam not found - Solved How to convert date to UTC format in Java? How to install autoconf, automake and libtool in Ubuntu 15.10? How to convert current date to mm dd yyyy format in Java? How to convert current date to dd mm yyyy format in Java? How to stop window closing in "internalFrameClosing" event. How to find list of all index in Neo4j? neo4j-server.properties file location SASLError using PLAIN: not-authorized

Ads

 
Advertisement null

Ads