How to Fix an Access Linked SQL Server Table That Cannot Add Records
Question details
The user needs to enable inserting new records into a Microsoft Access form linked to a SQL Server database via ODBC, which currently displays records but rejects new inserts.

- Product
- Microsoft Access / SQL Server
- Device & OS
- not provided
- Scenario
- Attempting to insert new records into a SQL Server database via a linked table in an Access form, often after database maintenance has been performed.
- Observed behavior
- The form displays existing records but prevents new inserts, sometimes returning an 'invalid character value for cast specification' error.
Ensure you have database administrator (DBA) privileges or the necessary permissions in SQL Server Management Studio to view and modify table schemas before making structural changes.
Verify and Add a Primary Key in SQL Server
Access requires a primary key in the linked SQL Server table to uniquely identify records; without it, the linked table becomes read-only and prevents new inserts.
When an Access database is linked to a SQL Server backend via ODBC, Microsoft Access must be able to uniquely identify each row to perform updates, deletions, or insertions. If a Primary Key or unique index is missing from the SQL Server table, Access defaults the linked table to read-only mode.
Launch SQL Server Management Studio (SSMS), connect to your database instance, and locate your target table in the Object Explorer.
Right-click the table and select 'Design'. Ensure that at least one column (such as an Identity column) is designated as the Primary Key (indicated by a key icon).
Save the table design changes in SQL Server before returning to Microsoft Access.
In Microsoft Access, navigate to the 'External Data' tab and click on 'Linked Table Manager'.
Select the checkbox next to the modified SQL Server table and click 'Refresh' or 'Relink' to pull the updated schema (including the primary key) into Access.

Update ODBC Drivers and Verify Data Types
Mismatched data types or outdated ODBC drivers can cause an 'invalid character value for cast specification' error when attempting to add records.
Try WPS Office for Your Daily Documentation Needs
While WPS Office does not include a database management tool like Microsoft Access, it serves as an excellent, free alternative for your daily Word, Excel, and PowerPoint tasks. You can easily export database records and analyze them within a highly compatible, lightweight office suite.
- 1. Export Database Data: Export your SQL Server or Access query results to a CSV or Excel file format.
- 2. Open in WPS Spreadsheet: Launch WPS Office and open the exported file in the Spreadsheet application.
- 3. Analyze and Report: Use powerful pivot tables and charts in WPS Spreadsheet to analyze your database extracts easily.

Frequently Asked Questions
Why does my Access linked SQL Server table show as read-only?
An Access linked table connected to SQL Server will remain in read-only mode if it lacks a Primary Key or a unique index. Access requires a unique identifier to know exactly which record it is updating or deleting.
How do I refresh a linked table schema in Access?
Navigate to the 'External Data' tab in Microsoft Access, click on 'Linked Table Manager', check the box next to your target SQL Server table, and click 'OK' or 'Refresh' to update the connection and schema.
What causes the 'invalid character value for cast specification' error?
This error often occurs when inserting data if there is a mismatch between the ODBC driver capabilities, field definitions, or data types—such as attempting to insert an incompatible date format or using an outdated ODBC driver.
Can I use WPS Office to manage a SQL Server database?
WPS Office is an alternative for word processing, spreadsheets, and presentations. It does not include a relational database management module like MS Access. However, you can export your SQL database data to CSV or Excel formats and use WPS Spreadsheet for advanced data analysis.




