Solved

help--delphi application MySQl as backend

Posted on 2003-10-23
10
271 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi XE2 application frozen on Windows 10 10 312
Delphi XE10 Round Image 2 128
tidtcpserver connection lost handle 2 86
control image tags in a string ? 12 131
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…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

778 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