Solved

help--delphi application MySQl as backend

Posted on 2003-10-23
10
270 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

914 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

21 Experts available now in Live!

Get 1:1 Help Now