Solved

help--delphi application MySQl as backend

Posted on 2003-10-23
10
272 Views
Last Modified: 2010-04-05
hi,

i'm planning to develop an an application in delphi 5 and mysql(4.0.12) as database, how to do? after i want to shift to kylix side.,

1)is delphi 5 comptable with mysql?if not tell me version i should choose ?.

which driver should i choose?

pls provide sample program or good tutors,


thanx in adv.,

Sreenu.
0
Comment
Question by:sreenu_v78
  • 3
  • 2
  • 2
  • +1
10 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 25 total points
ID: 9606434
Hi,

I've used MySQL with Delphi 5 in two different ways:

1. Download MyOLEDB3.EXE which installs MyOLEDB provider. Use ADO components (TADOConnection, TADOQuery, etc.). (I used MySQL 3.x there)

2. MyODBCxxx.exe which installs MySQL ODBC driver. Create a DSN entry (using ODBC Administrator) and use it either with BDE (TDatabase, TQuery, TTable, etc) or with ADO via 'Microsoft OLE DB Provider for ODBC Drivers'.

There is nothing special in writing the program. Use db components as usual.

There are third-party components available also:
http://sourceforge.net/projects/zeoslib/

Regards, Geo
0
 
LVL 2

Author Comment

by:sreenu_v78
ID: 9612111
thanx for information, ok after i want shift to kylix, which one should i use? once  again i need to chage code or not? how can i mange same code?

(i'm not familer with kylix.)
pls provide me some more information
Regards,
sreenu.
0
 
LVL 17

Expert Comment

by:geobul
ID: 9612558
>(i'm not familer with kylix.)
Me too. Sorry.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 7

Assisted Solution

by:jconde
jconde earned 25 total points
ID: 9719594
Hi!

First of all, you should consider upgrading to 4.0.16 :)

Second, you can't use MyODBC for this ... it will only be extremely painfull when ever you switch to Kylix !!

So basically there's 2 options left

Use the mysql api directly (100% portable between delphi & kylix) but your application won't have support DBAware controls
or
Use any of the few good TDataSet inherited components for mysql.

I only tried using Zeos once about 3 or 4 years ago and it was full of bugs, but I guess an active product matures quite a bit after 3 years right ?

The only set of components that I've used with good success are from SciBit TMySQLComponents, but they aren't free.

Some will probably suggest switching to D7 and using SqlExpress as it includes a MySQL driver ... don't do that !! ... refrain from using SqlExpress for MySQL because the stock SQLExpress driver for mysql _requires_ a very old libmysql.dll.
0
 
LVL 2

Author Comment

by:sreenu_v78
ID: 9737579
thanx for ur info, I' worked on TMySQLComponents,

i tried with TMySQLComponents(trail version) for Delphi 7 it's working fine.
but in kylix 3(It is also trail version) while installing TMySQLComponents for kylix version it is giving problem

like
"Invalid Package file <<filename>>"

any idea? regarding this.. how to install a package in kylix
0
 
LVL 7

Expert Comment

by:jconde
ID: 9737679
I'm sorry, I can't help you with that problem.  I am not a Kylix expert :(

Maybe you should consider asking the SciBit crew what's up with that ... I'm sure Jacques will be more than willing to help you sort the problem out.  ... Tell him I (jorge) sent you and he'll probably treat you like a charm :)
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 9737846
Sreenu,
I suggest you to read the following threads

http://www.mysql.com/portal/software/item-79.html (MySQL API for delphi and kylix)
http://www.aria.uklinux.net/pascal.php3 (MySQL, Kylix and Delphi too.)
http://www.ifm-services.com/people/jamesk/kylix/adv_in_kylix-1.html (Kylix Adventures)
http://crlab.com/mydac/ (MySQL data access components for both environments)
http://www.scibit.com/products/mysqlcomponents/index.htm (MySQL components)

http://forums.belution.com/en/kylix/000/000/18.shtml (Discussion)
http://www.mysql.com/portal/sites/item-136.html (MySQL connector for both environments)

http://community.borland.com/article/0,1410,27915,00.html (Public Beta: Kylix 1 dbExpress driver update for MySQL 3.23)
http://dbforums.com/arch/118/2002/9/511527 (Discussion)
0
 
LVL 7

Expert Comment

by:jconde
ID: 9737916
For the time being, I wouldn't use any "Direct Access" mysql components as chances are the new connection protocol in 4.1 isn't fully implemented yet.  Even though you _DO_ gain some speed by using direct access instead of calls to libmysql.dll, the client library will always be the safest, most up-to-date way to connect to mysql.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
indy Tmemory stream non latin charcter issue 2 121
Delphi XE10 Round Image 2 157
how to resize animated Gif image in delphi ? 1 35
Firemonkey BASS_Init into a thread 17 30
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question