Vote 투표 0 0
How to access Microsoft Access database from JDBC microsoft 액세스 데이터베이스에 액세스하는 방법 jdbc
Angsuman Chakraborty angsuman Chakraborty의
October 25th, 2003 2003년 10월 25일 private static final String accessDBURLPrefix = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="; private static final String accessDBURLSuffix = ";DriverID=22;READONLY=false}"; // Initialize the JdbcOdbc Bridge Driver static { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); } catch(ClassNotFoundException e) { System.err.println("JdbcOdbc Bridge Driver not found!"); } } /** Creates a Connection to a Access Database */ public static Connection getAccessDBConnection(String filename) throws SQLException { filename = filename.replace('', '/').trim(); String databaseURL = accessDBURLPrefix + filename + accessDBURLSuffix; return DriverManager.getConnection(databaseURL, "", ""); } 사립 정적 최종 문자열을 accessdburlprefix = "jdbc : odbc : 드라이버 = (microsoft 액세스 드라이버 (*. mdb)); dbq ="; 민간 정적 최종 문자열을 accessdburlsuffix = "; driverid = 22; 읽기 전용 = 허위)"; / / 초기화하는 jdbcodbc 브리지 드라이버를 정적 (시도 (class.forname ( "sun.jdbc.odbc.jdbcodbcdriver");) 캐치 (classnotfoundexception 이메일) (system.err.println ( "jdbcodbc 브리지 드라이버를 찾을 수없습니다!");)) / ** 액세스 데이터베이스에 대한 연결을 만듭니다 * / 공공 정적 연결을 getaccessdbconnection (문자열 파일명) 예외 sqlexception (파일명 = filename.replace ('', '/'). 트림 (); 문자열을 accessdburlprefix + 파일 이름 + databaseurl = accessdburlsuffix; drivermanager 반환합니다. 의 getConnection (databaseurl, "", "");) Filed under 밑에 Database 데이터베이스를 , Java Software 자바 소프트웨어 , Microsoft microsoft , Technology 기술 | |
| |
RSS 2.0 rss 2.0 | |
Email this Article 전자 우편이 문서
You may also like to read 같은를 읽을 수있습니다 |




October 12th, 2004 at 4:44 am 2004년 10월 12일에서 오전 4시 44분
and if the database have password? 그리고 만약 데이터베이스가 비밀 번호를?
March 28th, 2006 at 5:20 am 2006년 3월 28일에서 오전 5시 20분
[...] Previously I had provided the gist of how to access MS Access database from JDBC using JDBC-ODBC bridge. [...] 이전의 나는 요지를 제공하고 jdbc에서 데이터베이스에 액세스하는 방법에 액세스할 미시시피 jdbc - odbc 브릿지를 사용합니다. Today I will elaborate on that and provide you with two sample classes. 오늘은 그 정교한 2 개의 샘플 클래스를 제공할 수있게합니다. The first - AccessJDBCUtil.java defines a method which provides you with a connection to the ms access database. 첫 번째 - accessjdbcutil.java을 정의하는 방법으로 당신에 대한 연결을 제공하는 미시시피 액세스 데이터베이스를합니다. The second - AccessJDBCTest.java uses the first to execute any given query (DDL & DML supported) on any ms access database and displays the result on console. 둘째 - accessjdbctest.java 사용하여 어떤 주어진 첫 번째를 실행 쿼리 (ddl & dml 지원) 미시시피에서 어떤 결과를 콘솔에 액세스할 데이터베이스를 표시합니다. [...]
August 23rd, 2006 at 11:40 pm 2006년 8월 23일에서 오후 11시 40분
hi angsuman, 안녕하세요 angsuman,
your code was really useful. 귀하의 코드는 정말 유용합니다. everything makes sense.. 말이 ..
but i would like you to throw some light on how you constructed the dburl.. 하지만 전을 던질 드리고자합니다을 구축하는 방법에 어떤 빛을 the dburl ..
if i am right your code does not require the data source name.. 만약에 제가 맞다면 귀하의 코드의 데이터 소스 이름이 필요하지 않습니다 ..
i would like to know what your url means and how to construct such an url.. 귀하 무슨 의미를 알고 싶습니다 그리고 그러한을 입력하는 방법을 구축 ..
August 24th, 2006 at 8:56 am 2006년 8월 24일에서 오전 8시 56분
> if i am right your code does not require the data source name.. > 만약에 제가 맞다면 귀하의 코드의 데이터 소스 이름이 필요하지 않습니다 ..
Yes, the beauty of it is that it doesn’t require datasource name. 그렇습니다, 그것은 그것의 아름다움을 데이터 소스 이름을 필요로하지 않습니다.
> i would like to know what your url means and how to construct such an url.. > 귀하 무슨 의미를 알고 싶습니다 그리고 그러한을 입력하는 방법을 구축 ..
Just reuse the code I have provided. 필자가 제공한 단지의 코드를 재사 용할합니다. It is the format which jdbc-odbc bridge driver understands and converts to appropriate format for underlying odbc layer. - odbc 교량의 형식은 어느 jdbc 드라이버를 이해하고 기본적인 odbc 계층에 대한 적절한 형식을 변환합니다. In short just reuse my code. 요컨대 단지 내 코드를 다시 사용합니다.
July 7th, 2007 at 11:56 pm 2007년 7월 7일에서 오후 11시 56분
It is fine to know the conection of ODBC to MS ACCESS in Program.Buti wul’d like to know how to go control panel and then to ODBC and to give the 그것을 알고도 괜찮 회선의 액세스를 odbc program.buti 양에게 wul'd 제어판에서 이동하는 방법을 알고 싶습니다을주는 그 다음에 odbc
details of DNS name and select the required .mdb file. 세부 사항은 필수 dns 이름을 선택하십시오. mdb 파일을합니다.
I am sure ur going to give me the correct informatin. 위키가는 확신을주지 않으면 올바른 informatin.
July 15th, 2007 at 5:56 am 2007년 7월 15일에서 오전 5시 56분
the same question as venkat i tried using control panel but wen i ran the program it showed sql exception error… 똑같은 질문을 venkat 보았습니다로 제어판을 사용하여 프로그램을 보였다 그러나 wen sql 예외 오류 했더니…
tell me how to establish connection b/w ms access and jdbc through control panel (odbc data source name ) 설치 방법을 알려주십시오 연결 b / w 미시시피 제어판을 통해 액세스 및 jdbc (odbc 데이터 소스 이름)
July 16th, 2007 at 6:25 am 2007년 7월 16일에서 오전 6시 25분
i Want to access my Microsoft access file. microsoft 액세스 파일을 액세스할 수 싶어합니다. file exist on my local mechine… can any one give me example code for the same… the executed code 내 지역에 존재… 수 mechine 파일 중 하나는 같은 줘 예제 코드 실행 코드를…
August 3rd, 2007 at 3:06 am 2007년 8월 3일에서 오전 3시 6분
how to connect ajsp file with ms access….usinf jdbc….can u send me the tags whis is used 단기 파일을 연결하는 방법에 액세스할있는 상태…. usinf jdbc…. whis에 태그를 사용 할 수 u
November 23rd, 2007 at 8:20 am 2007년 11월 23일에서 오전 8시 20분
im trying to run applet with jdbc in an html file with the internet browser but the applet is opening but the database is not getting connected ….. jdbc에서 애플릿을 실행하려고 할 메신저로 파일을 인터넷 브라우저 그러나 애플릿이 연결된 개방하지만이 데이터베이스는 못하고… ..
November 23rd, 2007 at 7:59 pm 2007년 11월 23일에서 오후 7시 59분
You need to use either a type 3 (A net-protocol fully Java technology-enabled driver translates JDBC API calls into a DBMS-independent net protocol which is then translated to a DBMS protocol by a server. This net server middleware is able to connect all of its Java technology-based clients to many different databases. The specific protocol used depends on the vendor. In general, this is the most flexible JDBC API alternative.) or type 4 (A native-protocol fully Java technology-enabled driver converts JDBC technology calls into the network protocol used by DBMSs directly. This allows a direct call from the client machine to the DBMS server and is a practical solution for Intranet access. Since many of these protocols are proprietary the database vendors themselves will be the primary source for this style of driver.) JDBC driver to connect properly. 유형 중 하나를 사용해야합니다 3 (한에이 그물 - 프로토콜을 완전하게 자바 기술 - 활성화된 드라이버로 데이터베이스를 호출로 변환 jdbc - 독립적인 순수한 프로토콜이 프로토콜에 의해 데이터베이스를 다음 서버로 번역합니다.이 순수한 서버에 연결할 수있습니다 미들웨어 자바 기술 - 기반 클라이언트의 모든 데이터베이스를 여러합니다.의 특정 프로토콜을 사용의 공급 업체에 따라 달라집니다. 일반적으로, 이것은 대부분의 유연한 jdbc API를 대체합니다.) 또는 유형 4 일 (원시 - 프로토콜을 완전하게 자바 기술 - 활성화된 드라이버로 변환 jdbc의 네트워크 프로토콜을 사용하는 기술을 dbmss에 직접 전화를합니다.이를 통해 클라이언트 컴퓨터에서 전화에 직접적인 데이터베이스를 서버와가로 실용적인 솔루션을 인트라넷에 액세스합니다. 이후로 대부분의 경우 이러한 프로토콜이 독점적인 데이터베이스 공급 업체가 자신의 기본 소스 이 스타일의 드라이버를합니다.) jdbc 드라이버를 제대로 연결합니다.
June 3rd, 2008 at 11:37 pm 2008년 6월 3일에서 오후 11시 37분
i want to access data in excel to MS access how to write a code for this in java excel에서 원하는 데이터에 액세스하는 나는 양에게 접근이 자바에 대한 코드를 작성하는 방법에