For some reason no option for primary keys show up anywhere - not in the table design view or the table wizard. in the help, it states, "
Primary Key
If this command has a check mark, the data field in this line is a primary key. By clicking the command you activate/deactivate the status. The command is only visible if the data source supports primary keys."
How do I make the data source support primary keys? (and why would anyone make a data source that doesn't?)
Thanks
no primary keys?!
Re: no primary keys?!
in table design view (on table creation ONLY!),
right mouse-click on grey boundary, left-hand of row of field in question, the option is in po-up menu.
See it there?
right mouse-click on grey boundary, left-hand of row of field in question, the option is in po-up menu.
See it there?
Re: no primary keys?!
I do not.
I get : Cut, Copy, Delete, Insert Rows.
what should I do?
I get : Cut, Copy, Delete, Insert Rows.
what should I do?
Re: no primary keys?!
As you ask - you don't use the wizard (it's in table definition step).
The assignment "primary key" to a column is available only at table creation time. It's in the pop up menu from a row in the table definition grid.
Some data bases allow altering such table definition afterwards with a SQL statement: which DB engine do you use? And, btw: tell us OOo and OS versions, tnx.
The assignment "primary key" to a column is available only at table creation time. It's in the pop up menu from a row in the table definition grid.
Some data bases allow altering such table definition afterwards with a SQL statement: which DB engine do you use? And, btw: tell us OOo and OS versions, tnx.
Re: no primary keys?!
Thanks for your help - I still don't get it...
OOo 2.3.0
Win XP
Ok, from the top:
Run OOo Base from start menu.
[in database wizard]
choose "create new database"
click "next"
choose "No, do not register"
check "open database for editing"
not check "create table using table wizard"
click "finish"
name "test"
OK
[in database section]
click "tables" icon
[in Tasks section]
click "create table in design view"
[in test - OpenOffice.org Base: Table Design window]
right click slightly to the left of the green, right pointing triangle on the gray vertical strip
the menu reads "Delete; Insert rows"
exit that menu
Click in the field slightly to the right of the green triangle under "Field Name"
type "ID"
right click slightly to the left of the green triangle on the gray vertical strip again
The menu reads "Cut; Copy; Delete; Insert rows"
What am I doing wrong?
OOo 2.3.0
Win XP
Ok, from the top:
Run OOo Base from start menu.
[in database wizard]
choose "create new database"
click "next"
choose "No, do not register"
check "open database for editing"
not check "create table using table wizard"
click "finish"
name "test"
OK
[in database section]
click "tables" icon
[in Tasks section]
click "create table in design view"
[in test - OpenOffice.org Base: Table Design window]
right click slightly to the left of the green, right pointing triangle on the gray vertical strip
the menu reads "Delete; Insert rows"
exit that menu
Click in the field slightly to the right of the green triangle under "Field Name"
type "ID"
right click slightly to the left of the green triangle on the gray vertical strip again
The menu reads "Cut; Copy; Delete; Insert rows"
What am I doing wrong?
Re: no primary keys?!
Odd, because I can't reproduce this on my Mac Intel Tiger with OOo 2.3.0. If I do the exact same steps as you, I get the following choices in the context sensitive menu :
Copy
Cut
Delete
Insert lines
Primary Key
So, maybe you have a faulty installation.
Alex
Copy
Cut
Delete
Insert lines
Primary Key
So, maybe you have a faulty installation.
Alex
Re: no primary keys?!
I feel so silly! In order to get the Primary key you must define it as a number.
DUH!
Thanks for your help anyway.
DUH!
Thanks for your help anyway.
- DrewJensen
- Volunteer
- Posts: 1734
- Joined: Sat Oct 06, 2007 9:01 pm
- Location: Cumberland, MD - USA
Re: no primary keys?!
You do not need to declare a primary key field as a number. It can be any data type.
IF you declare it as type INTEGER or BIG INTEGER then you can also declare it to be AUTO_INCREMENT but that is all.
You can have a CHAR or VARCHAR as a primary key also, it is up to you then to insure that the data added is unique that is all.
IF you declare it as type INTEGER or BIG INTEGER then you can also declare it to be AUTO_INCREMENT but that is all.
You can have a CHAR or VARCHAR as a primary key also, it is up to you then to insure that the data added is unique that is all.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04