Free Web Hosting Untitled Document

open source masterhelp,macro, vba, word, cdma, component, delphi, excel

How to create MySQL Database runtime in delphi..?

Generally we always create MySQl database using tool like heidisql, mysql yog, phpadmind and so on. But in this tutorial I will show how to create database and table using delphi by runtime. Many ways to create  MySQL  database with runtime for example :

  • Import sql text by shellexecute to call mysql.exe or call batch file
  • Using Tzconnection
  • Using ZSQLProcessor
  • Using TZQuery
  • or may be using ado component witch connected with ODBC

In this section I will give example how to create MySQL database using Tzconnection

Next… on

Continue Reading…

Print Friendly

Implementation SELECT SQL in Delphi

One of DML SQL Command is SELECT.

SELECT is command to show record(s) from tabel in database

Syntax :

SELECT  * FROM TPEGAWAI;

NO NAME BORNDATE ADDRESS SALARY
1 Andi 20/08/1990 Jl gajah mada 20 Jember 3000000
2 Edy 16/07/1978 Perum taman gading blok zb no 2 Jember 5000000
3 Jack 18/05/1985 Jl trunojoyo 18 4000000

NOTE :

  1. SELECT : command to show
  2. *  refers to NO,NAME,BORNDATE,ADDRESS,SALARY
  3. TPEGAWAI is table name

How to use SQL in Delphi  ADO…?

Print Friendly

What is SQL

  • SQL is a standard language for accessing and manipulating databases.

What is SQL?

  • SQL stands for Structured Query Language
  • SQL lets you access and manipulate databases
  • SQL is an ANSI (American National Standards Institute) standard

What Can SQL do?

  • SQL can execute queries against a database
  • SQL can retrieve data from a database
  • SQL can insert records in a database
  • SQL can update records in a database
  • SQL can delete records from a database
  • SQL can create new databases
  • SQL can create new tables in a database
  • SQL can create stored procedures in a database
  • SQL can create views in a database
  • SQL can set permissions on tables, procedures, and views

SQL devide into two major command

  • DML (Data Manipulation Language) such as  SELECT, UPDATE, DELETE, INSERT
  • DDL (Data Definition Language) such as CREATE, ALTER, CREATE TABLE, CREATE DATABASE ect.

Continue Reading…

Print Friendly
|