Cannot work without Primary key after DB restore

All,

I recently did a backup/restore of my database from one server to another using MS SQL. I went into my solution and changed the DB preferences to point to the new server. After doing this I got the error “Cannot work without primaryKey on table ‘orders’”

I then went back into the DB preferences and changed back to the original server. I get the same error. When I check the backend db there is a primary key identified on the ‘orders’ table. To compound the issue I have the same solution running on a seperate machine that I use as my demo machine and it is connecting to the original server and it still works fine. I would create a release from the demo machine and import it to the working machine except I have made several changes to the original solution since exporting it to the demo machine.

I am sure it is something simple that I am not thinking of. Can anybody think of any reason that this issue would be happening?

Servoy Developer
Version R2 2.2.5-build 337
Java version 1.5.0_06-b05 (Windows 2000)

Thanks for any help in advance.
Steve Norris
LISCO

Sounds fishy. Can you view the table in your dataproviders list and seek what the primary key setting should be. Your primary key should be marked pk and the option db identity. If it is not, see if it will let you change it.

J

Thanks J,

The fix was simple. When I changed the db’s I didn’t transfer the user that created the table. Then when I changed back to the original db I changed the login via preferences to the sa login. Once I changed back everything is working fine now. Thanks again for your reply.

Steve

Good to hear…happy servoying : )