Entwickler-Ecke
Datenbanken - Delphi + MySQL (with transactions support)
José Fonseca - Fr 23.08.02 01:21
Titel: Delphi + MySQL (with transactions support)
Is there a version of MySQL with support for transactions, which can be used with Delphi? Thanks.
bis11 - Fr 23.08.02 09:41
Show on the site :
http://sourceforge.net/projects/zeoslib/This component can be connected to MySQL-Server.A demo participates also. It's very simple to write a program with this components.
Moderiert von
Tino: Neuer Link zu ZeosLib eingefügt.
neojones - Fr 23.08.02 10:30
But the major problem is: mySQL does not support transaction (if you mean commit and rollback as transaction).
bis11 - Fr 23.08.02 10:42
Is it a server from a provider ? When yes, the MySQL-Server is behind a Firewall. Then you must use phpMyAdmin or SQLAdmin.
ao - Fr 23.08.02 11:00
@neojones
MySQL Server supports transactions with the InnoDB and BDB Transactional table handlers. However, the non-transactional table types in MySQL Server such as MyISAM follow another paradigm for data integrity called "Atomic Operations''. Atomic operations often offer equal or even better integrity with much better performance. With MySQL Server supporting both paradigms, the user is able to decide if he needs the speed of atomic operations or if he need to use transactional features in his applications. This choice can be made on a per-table basis.
@bis11
Not every provider prevent access to a mySQL-Database on his server from a remote-system.
@José Fonseca
The Zeos-DB-Components support transactions.
Andreas
JAFonseca - Fr 23.08.02 14:57
The project I'm working in consists of a server computer, running Windows with Apache+MySQL installed, and client computers, which have a client application that sends requests (via sockets) to the server.
In the server App, I need to connect directly with MySQL. The data access needs to be safe, so I was thinking of using transactions. But if the other non-transactional MySQL table types offer security (with those atomic operations) I could use them instead...
Currently, I am making tests for the server app, and I've managed to connect to the MySQL database using the dbExpress components and using the DataSource module.
I don't know which method is better (dbExpress, Zeus, mysql.pas, ...). I need to choose one that is reliable, versatile and with long-term support & update. Which one do you recommend? I was thinking in using dbExpress...
Thanks a lot for all the help.
José Fonseca - Mo 26.08.02 11:27
Oops, sorry... I registered two usernames... this is the one I'll use...
So, could you tell me which component you recommend? Thanks.
ao - Mo 26.08.02 13:20
Hello José,
I prefer the Zeos-DB-Components, because they are open-source and support many databases like MySql, PostgreSql, Interbase, Oracle, Microsoft SQL, and IBM DB2.
Andreas
José Fonseca - Mo 26.08.02 16:07
Hi Andreas,
Thanks for the advice. I'm trying to install ZeosDB now... and I could use some help...
The instructions seem to be the following:
| Zitat: |
WINDOWS INSTALL
1. Unpack the archive with components
2. Copy libmysql.dll and/or libpq.dll into
your Windows/System directory
3. Edit Zeos.inc file. You may set there you language,
maximum quantity of supported memo fields, etc.
4. Add to Delphi Library Path pathes to XXX, XXX\common, XXX\dbase,
where XXX - ZeosDBO directory.
5. Compile and install library in Delphi 3.0, 4.0, 5.0 and
C++ Builder 4.0 with the same version of dpk file.
Install dpk files in the next sequence:
ZCommonXXX, ZDbwareXXX, { ZMySqlXXX | ZPgSqlXXX | ZIbSqlXXX
| ZMsSqlXXX | ZOraSqlXXX }
|
I've done steps 1-4, but I'm not sure what to do regarding point 5... could you please help?
As for dbExpress, I tried using a second SQLClientDataSet/Datasource pair, to access a second table from the same MySQL database, and it always says "Catastrophic failure" when trying to activate the SQLClientDataSet... no clue about the problem...
José Fonseca - Mo 26.08.02 16:32
Nevermind... I think I've managed to install it... :)
It was very simple in fact...
Open, Compile and Install: ZCommon6.dpk, ZDbware6.dpk and ZMySql6.dpk. Right? I'm using Delphi 6...
ao - Mo 26.08.02 16:42
Hi José
If you have Delphi 6, you must open the files ZCommon6.dpk, ZDbware6.dpk and ZMySql6.dpk one after another and in this order. After you have opened one of these files, you musst click on the compile-button and then press the install-button. If you have installed all of the three packages, you can now use the zeos-components to access a mySQL database.
For the "Catastrophic failure"-problem i have no answer, sorry.
Andreas
José Fonseca - Mo 26.08.02 17:56
It's working great! :)
Yes, I didn't give up and managed to install it... Anyway, thanks for your help Andreas...
Just for testing, I'm adapting a simple application I had done with PHP+MySQL, to manage clients, domains and users of a web hosting server, and it's working very well! It has two interconnected master-detail relations, and was extremely easy to adapt to Delphi+Zeos, using the same MySQL database structure...
I guess dbExpress catastrophicaly sucks then... :D
Entwickler-Ecke.de based on phpBB
Copyright 2002 - 2011 by Tino Teuber, Copyright 2011 - 2025 by Christian Stelzmann Alle Rechte vorbehalten.
Alle Beiträge stammen von dritten Personen und dürfen geltendes Recht nicht verletzen.
Entwickler-Ecke und die zugehörigen Webseiten distanzieren sich ausdrücklich von Fremdinhalten jeglicher Art!