clicked

Hi,

I have a table with fields accno,name,debit,credit…and 3 buttons…insert,update,delete.

when clicking insert button it has to be insert into the other table.

how can i do this…i write some code in the button clicked method

void clicked()
{
Bank _bank;
Transaction _trans;
;
super();
ttsbegin;
_trans.Accno=_bank.Accno;
trans.insert();
ttscommit;

}

When clicking the button a new record is creating in the transaction table but the data is not showing in the transaction table.Only empty record is created in the table.

How can i get this Please help me…

void clicked()

{

Args args;

Bank _Bank;

Transaction _Trans;

;

super();

_bank = this.args.record;

ttsbegin;

_Trans.Accno = _bank.Accno;

_Trans.insert();

ttscommit;

}

This is not working.

_bank=this.args.record;

here “this.args” its not comming

First, don’t place business logic on forms.

Second, your _back variable is empty so you’re actually not setting the Accno field.

Third, your Transaction table probably shouldn’t accept a record with no data.

HI Anish,

You are creating the maintable i.e bank buffer again,so it desn’t contain any record of it,that is the resaon behind it is not inserting the record in the trans table…

Use the buffer of the form — datasource – table(Bank)…

void clickd()
{
Transaction _trans;
;
super();
ttsbegin;
_trans.Accno = bank.Accno;
_trans.insert();
ttscommit;
}