Hello, anybody knows how to use de InsertRecord command with the TMyTable component?
I don't know what arguments i need to put into de brackets. I need to insert a new empty record in my database with my application.
Form.TMyTable.InsertRecord();
When I make it, How can I go to this blank record and how can I put values into the fields and save it?
Thanks.
How to use InsertRecord with TMyTable?
-
AndreyZ
Hello,
You can use one of the following ways to insert records (the result will be the same):or
You can use one of the following ways to insert records (the result will be the same):
Code: Select all
MyTable.Insert;
MyTable.FieldByName('integer_field').AsInteger := 1;
MyTable.FieldByName('string_field').AsString := 'test';
MyTable.Post;Code: Select all
MyTable.InsertRecord([1, 'test']);