Soal CPNS, Lowongan CPNS, Lowongan Kerja

Thursday, July 17, 2008

Delphi MySQL Connection With Mydac

In database programming, Connection to a dtabase is a compulsion. in election of database also we given on to some choices. Many the databases with each excellence and weakness. Ok is not necessarily be elaborate here I only study Conection between delphi with database MySQL for excess and lacking of MySQL I will not study here.
  • component install, it is of course you must look for formerly

if it is installed will emerge at panel

this of I apply component MyDAC v510, its the step :

For which has not can do installation of component is better if reads reference Delphi Component Instalation in this blog.

  • Create test database with tables tb_employ field nip, name , adress
  • Open Delphi, enters component MyConnection, MyQuery, DataSource, DBGrid, DBNAVIGATOR.
  • Double click at MyConnection, will emerge dialogue then contents of for example

  • Press Button connect
  • At MyQuery contents of propertis connection with MyConnection1
  • Double click at MyQuery, create Query according to desire for example

  • Changes propertis Active at MyQuery with True
  • At Datasource1 contents of propertis dataset with MyQuery1
  • To interfac to DBGrid and DBNavigator at propertis datasource each component is filled with DataSet1
  • If had incircuit is obtained display
  • Execute program, tries content and saves

result :

  • Good Luck

No comments: