Connecting to a MS Access database in Delphi XE5?

Does anyone have a simple code example for connecting to an Access database from a VCL Forms application using XE5?

Originally, we used the dbExpress Open ODBC driver in XE2 but that no longer works. The DbxXXDrv unit references Dbx34Drv, which in turn references DBXMetaDataCommand, which does not exist in my XE5 Enterprise install.

So I thought I'd try FireDAC, as there is Connect to Microsoft Access Database (FireDAC) topic in the docwiki. I dropped a TFDPhysMSAccessDriverLink onto a form, set the DriverID to MSAcc and the ODBCDriver to MS Access (*.mdb), but could not find the Database or Password properties. Do they need to be specified in the ODBCAdvanced property?
1
Richard
11/11/2013 11:16:12 PM
embarcadero.delphi.firedac 822 articles. 2 followers. Follow

3 Replies
4634 Views

Similar Articles

[PageSpeed] 0

> {quote:title=Richard Goodwin wrote:}{quote}
> Does anyone have a simple code example for connecting to an Access database from a VCL Forms application using XE5?
> 
> Originally, we used the dbExpress Open ODBC driver in XE2 but that no longer works. The DbxXXDrv unit references Dbx34Drv, which in turn references DBXMetaDataCommand, which does not exist in my XE5 Enterprise install.
> 
> So I thought I'd try FireDAC, as there is Connect to Microsoft Access Database (FireDAC) topic in the docwiki. I dropped a TFDPhysMSAccessDriverLink onto a form, set the DriverID to MSAcc and the ODBCDriver to MS Access (*.mdb), but could not find the Database or Password properties. Do they need to be specified in the ODBCAdvanced property?

I resolved the Open ODBC driver issue by removing the DBXMetaDataCommand from the uses clause as its Type is now in the DBXMetaDataCommandFactory unit.

Still none the wiser for how to use FireDAC to connect to an Access database though.
0
Richard
11/11/2013 11:56:21 PM
Even though the modification to the Dbx34Drv unit allowed the project to build, running it generates a "Unknown driver: DbxOpenOdbc" error.

At this point, dropping a TSQLConnection onto a new VCL Forms application form, then trying to set the Driver property generates a "Duplicates are not allowed" error.

[5211784E]{DbxCommonDriver190.bpl} Data.DBXCommon.{System.Generics.Collections}TDictionary<System.string,Data.DBXCommon.TDBXCreateCommand>.Add (Line 1764, "System.Generics.Collections.pas" + 7) + $12
[520FCF24]{DbxCommonDriver190.bpl} Data.DBXCommon.TDBXDriver.AddCommandFactory (Line 7585, "Data.DBXCommon.pas" + 3) + $7
[24433D88]{DataAccessComps.bpl} Dbx34Drv.TDbxOpenOdbcDriver.$bctr$qqrrx28Data.Dbxcommon.TDBXDriverDef (Line 730, "Dbx34Drv.pas" + 5) + $E

As my XE5 installation is now stuffed up, I want to re-open my original question of connecting to an Access database from XE5 since the way I did it in XE2 is no longer valid.

Edited by: Richard Goodwin on Nov 11, 2013 8:19 PM
0
Richard
11/12/2013 4:20:18 AM
> but could not find the Database or Password properties. Do they 
> need to be specified in the ODBCAdvanced property?

FDConnection1.Params.Add('DriverID=MSAcc');
FDConnection1.Params.Add('Database=c:\test.mdb');
FDConnection1.Connected := True;

-- 
With best regards,
Dmitry Arefiev / FireDAC Architect
FireDAC - Firebird, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, 
DB2, SQL Anywhere, Access, Informix, ODBC high-speed data access lib
0
Dmitry
11/12/2013 5:59:30 AM
Reply:

Similar Artilces:

How to: Window application with Delphi XE to access MS Access database?
I need to develop a Window application with Delphi XE to generate a form, which can display the data retrieved from an existing Microsoft Access database and update the data value in database as needed. Can someone advise me how should I get started and which implementation shall I use? Which tutorial materials can I look for? I am a new Delphi user. I called Embarcadero tech support on this subject, but got zero support from them. Thank you. Allen Allen, > I need to develop a Window application with Delphi XE to generate a form, > which can display the data retrieved fro...

Connect FireDac to Password Protected MS Access Database
I am trying to connect to a password protected MS Access database that is both password protected and also requires a SystemDB, username and password. Have looked through all the documentation but have been unable to find the connection parameter for the database password. I have been successful connecting to an unencrypted version of the database using the following parameters: DriverID=MSAcc User_Name=Usename Password=password Database=LocalDatabase.mdb SystemDB=System.mdw Can anyone supply me with the necessary information? Thank you ...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

delphi 2009 dbXpress supports MS Access databse connectivity?
Hi, Is it possible to connect to MS Access database from dXpress TSQLConnection object? If yes then how? regards, IK Hello Imtiaz MS Access is not supported by Embarcadero dbExpress drivers. But you can use 3d party products to work with MS Access: - AnyDAC - not a dbExpress, but there you can find everything you need to work with databases http://www.anydac.com - Open ODBC dbExpress driver http://open-dbexpress.sourceforge.net/ - OLEDB Direct and their dbExpress driver http://www.oledbdirect.com -- With best regards, Dmitry Arefiev www.anydac.com - high-spe...

Delphi XE5
Hi Watching Pawels video on Firedac usage he has his DataExplorer window showing all his Firedac connections. However, on my DataExplorer I only have dbExpress connections shown. Any idea why the Firedac ones are missing and how I can get them to show (so I can use them)? Barry Wood wrote: > Hi > Watching Pawels video on Firedac usage he has his DataExplorer window showing all his Firedac connections. However, on my DataExplorer I only have dbExpress connections shown. Any idea why the Firedac ones are missing and how I can get them to show (so I can use them)? Data Explorer supp...

Converting from Delphi 2005 to Delphi XE5
I have developed a number of Windows applications in Delphi 2005. I recently purchased Delphi XE5. I have started by trying to compile an existing 2005 application. I am getting a 7 errors about FMXTeeEditor. [dcc32 Error] E1026 File not found: 'FMXTee.Editor.Brush.fmx' Not able to find a solution to this. Any help greatly appreciated. Did you open every form before compiling? The old forms get updated with new properties when they are opened. I would make a copy of the old project before doing any of this. maybe you have links to the older tchart files....i.e its not usi...

Installing Delphi 7 and Delphi XE5 on same machine
Is there any implication installing Delphi 7 and XE5 on a same machine? Will it affect the 3rd party components, libraries, dll etc.? On 15/12/2013 23:56, Ebizit IT wrote: > Is there any implication installing Delphi 7 and XE5 on a same machine? Will it affect the 3rd party components, libraries, dll etc.? Ebizit, The usual guideline is to install in release order, Delphi 7 first, then XE5. I would also advise installing in a dedicated, security open directory such as: C:\Tools\Delphi-7 C:\Tools\Delphi-XE5 However, since I cannot afford the grossly inflated pric...

Connectivity to MS-Access DataBase
I want to connect MS-Access Database with Power Builder. Please can anyone tell me how to do it? Help me as soon as possible... Thanks in advance Here is a dsn-less approach... ls_database is the path to the MDB file. // ---------------------------------------------------------------------------- // Profile OpFileO4_Access SQLCA.DBMS = "ODBC" SQLCA.AutoCommit = False SQLCA.DBParm = "ConnectString='Driver={Microsoft Access Driver (*.mdb)};UID=admin;PWD=;DBQ=" + ls_database + "',ConnectOption ='SQL_DRIVER_CONNECT,SQL_DRIVER_NOP...

Connecting Ms Access Database
Hi �s There any way to connect to Microsoft Access Database From Pocket Powerbuilder ? (Pocket PC Side) Thanks Regards Pocket PowerBuilder only supports ASA as the client database at this time. -Marty "akin" <akin@boyutsis.com> wrote in message news:3f5f3ed2@forums-1-dub... > Hi > �s There any way to connect to Microsoft Access Database From Pocket > Powerbuilder ? (Pocket PC Side) > Thanks Regards > > ...

HID Access in Delphi XE5
I have a requirement to have two keyboard style devices working simultaneously, and be able to determine which of the two devices input has come from. Required OS support Windows XP+ Is there any simple way of doing this ? I've checked out nrComm Lib, but can't find out enough information to tell if it is possible. Also, I can't use the demo version, as Delphi will not run on the target system (and the devices are hard wired into the system). Thanks. Christopher Burke wrote: > I have a requirement to have two keyboard style devices working > simultaneousl...

Connection to MS Access database
I am using ODBC to connect to an MS Access database. In the table painter I cannot see any of the tables whose names contain spaces (ie multi word names). I can, however, see the names of queries which contain more than one word. I can retrieve from the tables through the db admin painter by delimiting the table names in double quotes. Can anyone tell me how to be able to see the list of table names. Thank you. Ches Chesney ches@a2z.uk.com Ches, You may want to try setting the DbParm parameter, DelimitIdentifier='Yes', so that PowerBuilder will enclose databa...

connecting to a ms access database
I got a free asp site from brinkster to test my page, it works fines with the webmatrix server but when I upload it to brinksters server I get this error: 'C:\nnone\db\mydb.mdb' is not a valid path. But this is the connection string in my code Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source= \nnone\db\mydb.mdb" Can anyone give me an idea on what's going on? The website is : http://www10.brinkster.com/nnone/index.aspx Hi there, The data source in the connection string needs an absolute file path to work, other...

MS Access Database Connect
Can I connect MS Access Database to Adaptive Server. It always said invalid ID or password! Thank you! Can you import data into Excel and MS Query? If you can then there is no reason why you shouldn't in Access as well although I haven't tried with Access. ...

How to connect MS-ACCESS database
How to connect MS-ACCESS 2003 database using ADO.Net using VB.NET language? Also binding data by server datacontrol Datagrid. Give me an example. Try http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconoverviewofadonet.asp to get an idea of how to use ADO.NET.RegardsDave...

Web resources about - Connecting to a MS Access database in Delphi XE5? - embarcadero.delphi.firedac

Connecting rod - Wikipedia, the free encyclopedia
In a reciprocating piston engine , the connecting rod or conrod connects the piston to the crank or crankshaft . Together with the crank, they ...

COVER BOY: Dec. 15 Issue of ‘Time’ Features Mark Zuckerberg on Connecting the World
The cover of the Dec. 15 issue of Time features a familiar face — that of Facebook co-founder and CEO Mark Zuckerberg , the star of a long feature ...

Digital Media Wire - connecting people & knowledge —
dmwnews : Anomaly, the ambitious graphic novel by Brittenham and Haberlin, features augmented reality. http://bit.ly/Iwrxjr Already optioned ...

Connecting People to Brands and Products on Mobile
People come to Facebook not only to connect with friends and family but also with products and brands. Here's how we're making it easier to list ...

What stops users from connecting with an app through Facebook?
... This equals 850 million users who connect with apps using Facebook at a 59 percent conversion rate. About 590 million users back out of connecting ...

Home - WHLT 22 Connecting the Pine Belt Fan
Facebook is a social utility that connects people with friends and others who work, study and live around them. People use Facebook to keep up ...

US IT Staffing Recruiters Group - Connecting Ideas !
US IT Recruiter's Groups: IT Technical Recruitment. Its all about connecting to new Ideas !

Cold Christmas Bubbles - A Cool Connecting Dots Puzzle for Kids on the App Store on iTunes
Get Cold Christmas Bubbles - A Cool Connecting Dots Puzzle for Kids on the App Store. See screenshots and ratings, and read customer reviews. ...

Connecting a Relay to Arduino - Flickr - Photo Sharing!
Simple circuit to connect a 5V relay to one of the digital output pins of the Arduino. I drew this after a few threads showed up on the Arduino ...

Evidence Connecting Scott Roeder to Operation Rescue Found in Roder's Car - YouTube
Rachel Maddow unveils video evidence from KMBC TV in Kansas City of a note found in Scott Roeder's car at the time of his arrest for the murder ...

Resources last updated: 1/9/2016 4:26:06 PM