Solved

help--delphi application MySQl as backend

Posted on 2003-10-23
10
269 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
Comment Utility
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
Comment Utility
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
Comment Utility
>(i'm not familer with kylix.)
Me too. Sorry.
0
 
LVL 7

Assisted Solution

by:jconde
jconde earned 25 total points
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Author Comment

by:sreenu_v78
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now