Silly question

Ok this is probably a silly question but I’ve been meaning to ask for a while.

When I want to open a TDAMemDataTable purely for appending new records, I’m currently adding a dynamic where condition to return zero records (i.e. ID = -1 or similar) as I don’t want to waste time and bandwidth retrieving existing records before I append.

Of course this still causes a round-trip to the server and a SELECT against the database and seems inefficient. What’s the recommended way of doing this, i.e. opening a table so I can append but not retrieving any data?

1 Like

try

  Table.RemoteFetchEnabled := False;
  Table.Open;
  Table.RemoteFetchEnabled := True;

Aha, seems obvious enough. Thanks, will try that.