SQL Server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The database that I created was recently upsized to a SQL Server. I am now
running into the problem of not being able to add new records. How can I set
my form up to add new records to the table. Can someone please help?
 
WMorsberger said:
The database that I created was recently upsized to a SQL Server. I
am now running into the problem of not being able to add new records.
How can I set my form up to add new records to the table. Can
someone please help?

The tables on the SQL Server need to have Primary Keys defined on them. If
you link to an ODBC connected table without a PK then the link is read only.
There is a work-around, but since every table should have a PK anyway that
is the way to fox it.
 
make sure there's an unique index on the table
if you can't / aren't allowed to modify the table itself you can make an
Access index for the table

to do so Paste (similar) SQL in the SQL view of a new Query
CREATE UNIQUE INDEX U_myTable ON myTable (MyUniqueColumn) [WITH PRIMARY]
or
for compound unique columns
CREATE UNIQUE INDEX U_myTable ON myTable
(MyUniqueColumn1,..,MyUniqueColumnN) [WITH PRIMARY]

--
Pieter Wijnen

My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/
 
I went into all the tables and added primary keys to ones that did not have
them and everything worked perfectly.

Thank you for helping me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top