Squall_FF8 1 Posted Monday at 09:29 AM (edited) Hi guys, This one was suppose to be easy, but I cant setup a TFDConnection to connect to .accdb. Is it possible? How to do it? For looong reasons in my other post , I ended up with 64 bit application that tries to connect in runtime. First I tried with ADO - all worked. I love using FireDAC, so I'm trying to do it with TFDConnection, - alas no success. If it matters, here is ConnectionString for ADO: Provider=Microsoft.ACE.OLEDB.12.0;Password="";Data Source=xxxx.accdb;Persist Security Info=True;Jet OLEDB:Database Password=xxxx Edited Monday at 09:32 AM by Squall_FF8 Share this post Link to post
Anders Melander 1946 Posted Monday at 01:11 PM It would probably be relevant if you explained what you mean by "no success". What errors are you getting, if any? What does your FireDAC connectionstring look like, etc.? Share this post Link to post
Squall_FF8 1 Posted Monday at 10:02 PM (edited) 8 hours ago, Anders Melander said: It would probably be relevant if you explained what you mean by "no success". What errors are you getting, if any? What does your FireDAC connectionstring look like, etc.? It will be very helpful to see a snippet of how to setup the connection with code (at runtime). What i did? Well unlike MS SQL, I have no clue what property I need to set for Access. So I setup DriverID = MSac, then I copied the ADO ConnectionString in FD ConnectionString with hope it will work. P.S. Even if you set the connection at design time, if you can share the resulting ConnectionString, should be enough for start. Edited Monday at 10:03 PM by Squall_FF8 Share this post Link to post
Anders Melander 1946 Posted Monday at 10:11 PM I haven't used Access in... 25 years I think, so I can't help with specifics. My guess is that you need to set up a ODBC DSN using the ODBC Data Source Admin. Once that is done I think you can configure FireDAC to connect to the ODBC DSN. Share this post Link to post
Mark- 31 Posted Monday at 11:51 PM (edited) 14 hours ago, Squall_FF8 said: This one was suppose to be easy, but I cant setup a TFDConnection to connect to .accdb. Is it possible? How to do it? Yes it is possible, we and some of our customers connect to MS Access. Not the most used database, but used. From our user manual: Direct connect to the data base At least these three parameters must be present for direct connection to a database via ODBC. DriverID ODBCDriver Database A DSN can be used and then just a DataSource parameter is needed. I know it worked when I tested it but, I have never seen a user apply it. All I have seen is the first example and it is what I use. Mark Edited Monday at 11:54 PM by Mark- 1 Share this post Link to post
Squall_FF8 1 Posted yesterday at 02:01 PM 14 hours ago, Mark- said: Direct connect to the data base At least these three parameters must be present for direct connection to a database via ODBC. DriverID ODBCDriver Database Thank you very much, Mark! This is the starting/reference point I needed. It seems I started with wrong DriverID, and thus no chance to make it. 1 Share this post Link to post
Roger Cigol 127 Posted 23 hours ago We have successfully written a 64bit C++ Builder App that ran on a Windows 10 64 bit OS and talked to an MS Access database. But you need to use the microsoft 64bit access run time driver package. This cannot exist along side the MS Access program. So either you have to uninstall MS Access before installing the 64bit driver package or you run the 64 bit application in a virtual machine with the MS Access *.mdb and other files on a drive that the virtual machine can connect to. Share this post Link to post
Dmitry Arefiev 109 Posted 19 hours ago https://docwiki.embarcadero.com/RADStudio/Athens/en/Connect_to_Microsoft_Access_Database_(FireDAC)#Use_Cases Share this post Link to post