Make tables without a key editable
A table without a unique key is read-only without a release. Once released, it can be changed and deleted by its old values—exactly as Access does over a direct connection.
Solution overview
For released tables, the service offers two bound actions (UpdateByOriginal, DeleteByOriginal);
the ODBC driver uses them by itself. The entries have the same forms as for the row stamp
(schema.tabelle, schema.*, *). Rules of the actions:
OData v4: tables without a key.
Implementation
With an administration store (administration app):
- Open Datenquellen (Data sources), and expand the data source with the arrow at the start of the row.
- On the Tabellen-Einstellungen (Table settings) tab, select Neu (New): as the setting choose Tabellen ohne Schlüssel bearbeitbar machen (keyless_write) (Make tables without a key editable), and under Tabellen (Muster) (Tables (pattern)) enter, for example,
dbo.Protokoll. - Leave the row.
Without an administration store (configuration file): add to the data source's entry, and restart the service:
{ "Name": "fachdaten", "Provider": "sqlserver", "ConnectionString": "…",
"KeylessWriteTables": [ "dbo.Protokoll" ] }
Then, in both cases:
- Relink the table in Access.
- Check: the schema document declares the actions
UpdateByOriginalandDeleteByOriginalfor the set; a changed value in Access is saved.
Notes
- Duplicates stay unchangeable. If the old values match several identical rows, the service rolls the change back (
409); Access reports that the update failed, and both rows stay unchanged. The remedy is a key or cleaning up the data. - Access doesn't compare long text. Additionally turn on the row stamp for the same table; then the service also detects someone else's change made only in the long text.
- A listed table that does have a key after all is still written through that key; the log names it.
Related topics
en/wiki/data-conectivity/database-gateway/how-to/release-tables-without-key.txt · Last modified: by Wolfgang van der Stille