How to connect to database file in 2018b with GUI?

조회 수: 3 (최근 30일)
BSantos
BSantos 2018년 10월 24일
편집: BSantos 2018년 10월 24일
Hi everyone,
I have developed a GUI that enables the user to connect, open and fetch results from a Microsoft Access file (.mdb). My code was previously written in Matlab R2014b (32-bit) using JDBC:OBDC bridge, which is no longer valid in Matlab R2018b (64-bit). The code below is active when the user pushes a GUI button.
Matlab R2014b (32-bit) code:
[file, dir] = uigetfile('*.mdb','Get Database','Database Selector');
DB.dbpath = fullfile(dir, file);
DB.conurl = ['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)}; DBQ='DB.dbpath];
DB.con = database('','','','sun.jdbc.odbc.JdbcOdbcDriver', DB.conurl);
Question 1: Can someone help me on how to update this code for Matlab 2018b 64-bit version?
Question 2: Is it possible to set up a button on GUI to open Database Explorer, when the user runs application?
My system:
  • Windows 7, 64-bit
  • Matlab R2018b 64-bit
Thank you very much for your help!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Reporting and Database Access에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by