[Solved] Seems it's not saving my primary key selection

Creating tables and queries
Post Reply
jquinn83
Posts: 4
Joined: Mon Jul 03, 2017 3:03 am

[Solved] Seems it's not saving my primary key selection

Post by jquinn83 »

Creating a database for Trading Cards. I would like it to be for more then just one sport. For the Main table, "Cards", the first four fields are as follows; 'Sport ID', 'Year', 'Set' and 'Number' Since the trading card companies like to use the same sets in each sport these fields have to be unique. There is a 2017 Donruss Elite #1 for Baseball, Football and Basketball. So I highlighted all four of those fields, right-click and clicked Primary Key. It put a key next to each field. When I save it the Keys disappear. Is the primary Key set and its not displaying the keys? Is there a limit on how many fields can be in a primary key? Is there something else I'm doing wrong?
Last edited by Hagar Delest on Tue Jul 04, 2017 9:54 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1.1 on 64-bit Windows 10
User avatar
keme
Volunteer
Posts: 3699
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Doesn't look like it is saving my primary key selection

Post by keme »

That should work as long as you work on a proper database file. (With the "embedded" database type this works, and I think it also does when connecting to a dBase or similar database file.) This runs a database server module inside the Base application.
Pitfalls:
  • To create/change a PK on existing data, the new PK must satisfy the requirements: Unique value set, not null values.
  • If your data tables are text files or spreadsheets, the concept of PK is not supported.
  • If you are accessing an external database (DB server outside of the Base application, either on your own computer or accessed over a network), Base does not support editing of table structure (at least it didn't last time I checked). You must use other DB tools for that.
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
jquinn83
Posts: 4
Joined: Mon Jul 03, 2017 3:03 am

Re: Doesn't look like it is saving my primary key selection

Post by jquinn83 »

Something was wrong with the table it wasn't letting me enter anything. I deleted and created another table and it right as rain.

How do you mark a topic as solved?
OpenOffice 4.1.1 on 64-bit Windows 10
User avatar
robleyd
Moderator
Posts: 5055
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Doesn't look like it is saving my primary key selection

Post by robleyd »

How to tag a topic as solved.

In your first post, click the Edit button. Go to the subject line and add [Solved] at the beginning of the subject.

Then select the tick as the Post icon (just below the subject line). Preview if you wish to see how it looks.
Finally, hit Submit - done!
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
Post Reply