For normal insertion of data into database How To Insert Data into Database Using Insert Command .
doInsert
If a Insert method is overridden in the table level giving the direction to insert a default value for amount as 150.00, then whatever data u insert with above code then the amount data will be 150 only.
But if you want to insert data bypassing the overriden method then we use doInsert().
1.Right Click on method(object level)
2.override method --> insert.
3.this.Amount = 150;
table15 tb15;
;
tb15.id = 101;
tb15.name = "naresh;
tb15.Amount = 125.00;
tb15.doInsert();
In this case the inserted data will be 125.00 as amount because the doInsert( ) overrides the insert method at the object level and takes 125 as input.
doInsert
If a Insert method is overridden in the table level giving the direction to insert a default value for amount as 150.00, then whatever data u insert with above code then the amount data will be 150 only.
But if you want to insert data bypassing the overriden method then we use doInsert().
1.Right Click on method(object level)
2.override method --> insert.
3.this.Amount = 150;
table15 tb15;
;
tb15.id = 101;
tb15.name = "naresh;
tb15.Amount = 125.00;
tb15.doInsert();
In this case the inserted data will be 125.00 as amount because the doInsert( ) overrides the insert method at the object level and takes 125 as input.
No comments:
Post a Comment