Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

help--delphi application MySQl as backend

Posted on 2003-10-23
10
Medium Priority
?
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
10 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 100 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 7

Assisted Solution

by:jconde
jconde earned 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

730 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