I am using Delphi XE5 and I have created basic Firemonkey Mobile Application - Delphi
I would like to connect to a remote MySQL database. Which if any database conduit do I use? (FireDAC, DBExpress, etc)?
You can use standard TSQLQueries, but as your mobile app needs to connect to a remote database, you will need to go via a DataSnap service (most probably hosted on an IIS server). The mobile device then connects to the DataSnap server which then connects to the database.
The DataSnap functions can return TDataSets which your app can then use.
You can take a look at Devart DAC
I'm using DBExpress since XE2, it works good, but i think now FireDAC is much bettter
Related
I am creating an android application in android studio and I am using SQLite as the local database. I am using MySQL database as the application server. I want to be able to pull the data from MySQL into Android Studio to access it and also sync the local SQLite database and the MySQL database.
I do not want to use Web services and php files to connect MySQL, I would like to use JDBC instead, so My question is:
can I use JDBC to this purpose and how?
What is the most secure and effecient method of connecting a Delphi program to a MySQL database hosted on an Apache server from my web hosting provider.
Ideas, hints or any information regarding the above, preferably using dbExpress with Delphi 2010 will be highly appreciated.
Thanks
Well you cant connect directly because of the security issues but there are a couple,
Write a web-service that catches the request and send back you the
response.
write a php script that gets the requests and gives back responses.
if you are hosting on a windows server you can connect via VPN that
will give you a direct sql connection and still be secure.
You can connect directly MySQL Database. I recommend using FireDAC component.
About FireDAC :
FireDAC Multi-Device Data Access Library
Universal Enterprise Data Connectivity
FireDAC is a Universal Data Access library for developing applications for multiple devices, connected to enterprise databases. With its powerful universal architecture, FireDAC enables native high-speed direct access from Delphi and C++Builder to InterBase, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, DB2, SQL Anywhere, Advantage DB, Firebird, Access, Informix, DataSnap and more.
FireDAC Data Access Components
Also you can use MySQL Data Access Components (MyDAC or UniDAC) :
About MyDAC Component:
MySQL Data Access Components (MyDAC) is a library of components that provides direct access to MySQL from Delphi, C++Builder, Lazarus (and Free Pascal) on Windows, Mac OS X, iOS, Android, Linux, and FreeBSD for both 32-bit and 64-bit platforms. Applications based on MyDAC can connect directly to MySQL server or work through the MySQL client library. MyDAC is designed to help programmers develop faster and cleaner MySQL database applications.
MySQL Data Access Components
If you want connect MySQL with dbExpress (i don't recommend it)
You need dbexpress driver for MySQL dbxmys.dll and alos MySQL client library libmySQL.dll.
I use MySQL as a remotely accessed DBMS from Go Daddy web hosting. Unidac is used to connect to the remote data set no problem. I then use a signed VCL component based GUI on the client side.
The VCL based GUI blows the doors off all other web based applications (including .NET). All the functionality of the Delphi application works flawlessly but I perform all DBMS functions to a remotely hosted MySQL database. I really appreciate this combination of technologies that allows me to produce the most robust applications possible.
I have a Winforms desktop app that need to read/write data from/to a MYSQL database. The MYSQL server is on a machine that runs on Linux OS. I need to know if a .NET connector is to be used or an ODBC connector?
Also, considering that I do not need remote access to MYSQL server, is a connector sufficient to access the server from the windows desktop? Do I need to do something on the server side? I've been looking around and getting mixed signals, some people said a web service is required while others said no.
I need to know if a .NET connector is to be used or an ODBC connector?
I never connected to MYSQL before, but i think you can use these data provider or, ODBC too.
Is a connector sufficient to access the server from the windows desktop?
Yes. A valid address to your server is all you need to access it, using data providers or ODBC. Of course, your database need to be up and running too.
Do I need to do something on the server side?
Just install your MYSQL database.
Maybe this link will help you.
I would like to have a Flash Application (not air) to connect to a local database.
Air is not only getting unsupported by Adobe in LINUX but besides, it has serious problems and miss implementation with SQLite.
So we want to connect to a local MySQL database.
This application should be simple, so we do not want to also have an unnecessary web server (also local) to make a middle communication between the flash app and the MySQL server.
There is this driver that allow to communicate Flash with MySQL
http://code.google.com/p/assql/
Question is:
Is this the best approach?
Would it be any problem using this approach when installing the whole application to each client? (because we also in the installation should install a MySQL server).
A MySQL SERVER is called a SERVER for a reason: It is meant to be installed on servers, not on clients. So the answer to your question is:
1) No, this is not the best approach. Not even close. You would be better off using a SQLite database (however shitty you may think it is)
2) Yes. Nobody would like installing a MySQL server on their computers just for the sake of running your application. Think of casual (non-expert) users who would need to install and configure the server just for running your app. That is the very REASON why they developed SQLite and so many languages support it.
You should check out http://code.google.com/p/air-sqlite/ for sqlite access in AIR (I don't know if this is the same as the inbuilt code or not, so just check that out)
i bought a web domain with some web space. They support only mySQL DB, how do i access the my SQL DB on my asp.net application? is there is way to access it through .net base classes without installing third party drivers?
You can reference MySQL .net connector .dll which will be placed in your bin folder.
The standard Conector/Net should work. It's pure C# and communicates with MySQL over sockets. If that isnt supported you should talk to your host about how to get it working.