# No primary key error, but there is one...

**URL:** <https://forum.servoy.com/t/no-primary-key-error-but-there-is-one/14405>\
**Category:** Classic Servoy\
**Created:** [August 3, 2011, 4:14pm UTC](https://forum.servoy.com/t/no-primary-key-error-but-there-is-one/14405 "2011-08-03T16:14:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thunder](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@Thunder](https://forum.servoy.com/u/Thunder)\
**Post date:** [August 3, 2011, 4:14pm UTC](https://forum.servoy.com/t/no-primary-key-error-but-there-is-one/14405/1 "2011-08-03T16:14:06Z")

</div>

I have a table called search which was created by copying another table. I removed the pk from it because it was a meaningless name in the new context, and added a new search\_id field integer / not null etc.

Servoy complains that:

> Form “search\_frame” is based on table “search” which does not have a primary key.

I have added the PK constraint in PGAdmin to that field, and if I view the table from within Servoy, it says pk the ‘Row ident’ column, but I still have two errors about the search table not having a pk.

See attached screenshot…

Bevil

 ![Screen Shot 2011-08-03 at 17.04.22.png](https://canada1.discourse-cdn.com/flex010/uploads/servoy/original/1X/7b98d2e67c8369ac74230f6fc99d1ee9ac28def8.png)

---

<div class="post-metadata">

**Author:** ![lvostinar](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/lvostinar/32/5248_2.png) [@lvostinar](https://forum.servoy.com/u/lvostinar)\
**Post date:** [August 4, 2011, 8:20am UTC](https://forum.servoy.com/t/no-primary-key-error-but-there-is-one/14405/2 "2011-08-04T08:20:10Z")

</div>

I think you have to trigger a clean build (from menu Project → Clean)
