Path: news.mathworks.com!not-for-mail
From: "Phil Goddard" <phil@goddardconsulting.ca>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Create Access Database in Matlab using active x server
Date: Sun, 21 Oct 2012 21:43:08 +0000 (UTC)
Organization: Goddard Consulting
Lines: 12
Message-ID: <k61q9c$i1d$1@newscl01ah.mathworks.com>
References: <k3qhu7$r31$1@newscl01ah.mathworks.com>
Reply-To: "Phil Goddard" <phil@goddardconsulting.ca>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1350855788 18477 172.30.248.37 (21 Oct 2012 21:43:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 21 Oct 2012 21:43:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 26433
Xref: news.mathworks.com comp.soft-sys.matlab:781118

According to the CreateDatabase doc you must supply a second argument (that specifies a locale).

Within VBA this would be something like
Application.DBEngine.CreateDatabase('test2.accdb',dbLangGeneral)

Since MATLAB doesn't recognize the dbLangGeneral constant (nor its cousins) you need to do a little work to find what that (string) constant is defined as.

It seems that the following works:
>> svr = actxserver('Access.Application');
>> createdDB = svr.DBEngine.CreateDatabase('test2.mdb',';LANGID=0x0409;CP=1252;COUNTRY=0');

Phil.