Connect to MySQL using Data Access Components for Delphi
In this video tutorial, we learn how to connect to MySQL database using Data Access Components for Delphi. With MyDAC you can easily work with database and retrieve data from it. If you are looking for a simple way to connect to a MySQL or MariaDB database from Delphi, C++Builder, Lazarus on Windows, macOS, Linux, iOS, Android., this components are perfect solution. In this video we will show how easy is it to use these data access components.
Closed Caption:
[Music]
here in this brief tutorial i'd like to
show the highest performance data access
component called mydaq in action mydag
is the unified connectivity solution by
devart and it provides boundless
potential when working with mysql mydac
provides components that provide direct
access to mysql and memory to be from c
plus plus builder and delphi
let's open the download page here you
can see the latest version i have my red
studio 11 alexandria
actually this is the professional
edition for evaluation proposes with
some limitations you can see here
let's download and install
well after a successful installation you
can see the new mydaq menu
here you can see the install component
set we have the trial edition
so you can go with dell v or c plus i'm
going to go with the multi-device
application delphi
blank application
well this is our blank application here
so if you go to the palette you can see
my dag components
with this set of components you can have
all the features you need and additional
product options to simplify your
workflow like service tasks http
tunneling vault-dated loading row level
and table level looking
let's see these components in action now
i'm going to put the tmi connection
component here
double-click it
and here you need to connect to your
server
well this is my mysql workbench
let's
go to the themes window
this is the query for the database so we
can just
now create it
here we go
select rows
there you can see the data
here is the connection details you
should node
so go back to red studio
here put the localhost server connection
details
server is localhost username is root
give the password and select the
database
now we have connected to the database as
you can see it is already connected here
let's put the t my query component to
create queries on the database with sql
as you can see it is automatically
showing the connection details here
now
let's write our select command to the s
called strings property where it affects
the data from the table when it's first
connected
there we go
now let's write one line of code here
where we close the database connection
between the application and the server
when we close the application
you can see the table already in the
live bindings designer
since we are creating cross platform
application now it's better to utilize
tillis view component to show the data
rather than using t string grid
now let's change the item appearance
because
we need to show more data in each list
view item
now let's connect the ui controls and
data source
sync properties should be connected
first
then the other columns
great you can already see the data on
the forum designer
now let's save and build our project
well this is our final app where we have
connected to the mysql database file and
used live bindings to bind the data
source to listview without writing any
line of code
mydaq is the go to component set when it
comes to working with mysqlite supports
cloud-based mysql services and allo's
mobile applications to work with mysql
databases as simply as desktop
applications too i'll leave the link to
this page where you can learn more about
the mydeck component set
thank you for watching
Video Length: 04:40
Uploaded By: Devart
Published: 12/15/2022
View Count: 5,296