/////////// The SQL command used by the adapter /////////////

SELECT customer_num, fname, lname FROM customer
INSERT INTO customer ( customer_num, fname, lname ) VALUES ( ?, ?, ? )
UPDATE customer SET  fname =?, lname = ? WHERE customer_num = ?
DELETE FROM customer WHERE customer_num = ?

/////////////// Code that need to be typed //////////////////

        private System.Data.DataSet ds;


        private void Form1_Load(object sender, System.EventArgs e)
        {
            ds = new DataSet();
            ifxDataAdapter1.Fill( ds, "customer" );
            dataGrid1.SetDataBinding( ds, "customer" );
        }

        private void BtnUpdate_Click(object sender, System.EventArgs e)
        {
            try
            {
                ifxDataAdapter1.Update( ds.Tables["customer"] );
                MessageBox.Show( "Update Success" );
            }
            catch (Exception ex)
            {
                MessageBox.Show( ex.Message );
            }        
        }

/////////// Schema ////////////////////////////////

drop table customer;

create table customer
(
        customer_num            integer,
        fname                   char(30),
        lname                   char(30),
 	primary key (customer_num)
);

insert into customer values ( 101, "a1a", "b1b" );
insert into customer values ( 102, "a2a", "b2b" );
insert into customer values ( 103, "a3a", "b3b" );
insert into customer values ( 104, "a4a", "b4b" );
insert into customer values ( 105, "a5a", "b5b" );
insert into customer values ( 106, "a6a", "b6b" );
insert into customer values ( 107, "a7a", "b7b" );
insert into customer values ( 108, "a8a", "b8b" );
insert into customer values ( 109, "a9a", "b9b" );
insert into customer values ( 110, "a10a", "b10b" );


