News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Name:Alex Dybenko

Location:Moscow, Russia

Thursday, May 18, 2006

New records in a query, based on linked table

I am building client-server applications, with Access as FE and SQL Server as BE, already several years, but only today I noticed the following. If you create a query in Access, or open DAO recordset, on a SQL Server linked table – you should have table’s primary key in field list (or just all fields using *) in order to append new records to this query or recordset. No primary key – you cannot add new records, you can only update existing. If you have an Employee table with ID as primary key and Name as text then this query:

Select Name from Employee

Do not allow new records, but this will allow:

Select ID, Name from Employee


Anonymous Anonymous said...

Yes thank you
I have had this problem and now have the solution

5:29 PM  

Post a Comment

<< Home