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

Creating tables and queries

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

Postby jquinn83 » Mon Jul 03, 2017 3:35 am

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
jquinn83
 
Posts: 4
Joined: Mon Jul 03, 2017 3:03 am

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

Postby keme » Mon Jul 03, 2017 11:29 am

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 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 2984
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

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

Postby jquinn83 » Tue Jul 04, 2017 4:14 am

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
jquinn83
 
Posts: 4
Joined: Mon Jul 03, 2017 3:03 am

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

Postby robleyd » Tue Jul 04, 2017 5:17 am

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
Apache OpenOffice 4.1.6 - Slackware 14.2 - 64 bit
LibreOffice 6.0.7.3 - Slackware 14.2 - 64 bit
Apache OpenOffice 4.1.4 - Windows 7 Virtual machine
User avatar
robleyd
Moderator
 
Posts: 2251
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia


Return to Tables & Queries

Who is online

Users browsing this forum: msahines and 1 guest