| View previous topic :: View next topic |
| Author |
Message |
MMA-Jon General User

Joined: 07 Mar 2009 Posts: 11 Location: Wales
|
Posted: Tue Mar 24, 2009 10:05 am Post subject: [Solved] Error Makes Base unusable |
|
|
When I open Base, I can design a table and it works as normal, but when I open it to enter things, I get one and a half columns in the middle of a blank page. I can't click anthing or type in anything. Any help? _________________ NOOB BUT PRO
Last edited by MMA-Jon on Sat Mar 28, 2009 1:28 pm; edited 3 times in total |
|
| Back to top |
|
 |
r4zoli Super User

Joined: 17 May 2005 Posts: 570 Location: Budapest, Hungary
|
Posted: Tue Mar 24, 2009 11:02 am Post subject: |
|
|
| What OOo version on which op.system? |
|
| Back to top |
|
 |
MMA-Jon General User

Joined: 07 Mar 2009 Posts: 11 Location: Wales
|
Posted: Wed Mar 25, 2009 9:22 am Post subject: |
|
|
it's vista x64 on version 3.0. _________________ NOOB BUT PRO |
|
| Back to top |
|
 |
MMA-Jon General User

Joined: 07 Mar 2009 Posts: 11 Location: Wales
|
Posted: Fri Mar 27, 2009 10:04 am Post subject: |
|
|
hmm... it works in the wizard but personally I hate the wizard is restrictive as to what you can put in. What am I doing wrong??? please help, it's driving me crazy!! _________________ NOOB BUT PRO |
|
| Back to top |
|
 |
r4zoli Super User

Joined: 17 May 2005 Posts: 570 Location: Budapest, Hungary
|
Posted: Fri Mar 27, 2009 10:38 am Post subject: |
|
|
| Your table has a primary key? |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2474 Location: 3rd Rock From The Sun
|
Posted: Fri Mar 27, 2009 10:55 am Post subject: |
|
|
MMA-Jon:
I am not sure I understand your question . . . or . . . what you are seeing . . . or . . . not seeing. Can you please be more specific, so, someone can help?
When I asked Base . . . to EDIT ( change the characteristics of the Table definition ) . . . what I see is shown below. Please note . . . in this example . . . a Primary Key was defined . . . that can be seen by the key icon to the left of the field ID .
If you want to "Open" the table . . . for input . . . you can select "Open" from the sub-menu after right clicking the name.
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to add [Solved] in your first post title (edit button) if your issue has been fixed / resolved. |
|
| Back to top |
|
 |
MMA-Jon General User

Joined: 07 Mar 2009 Posts: 11 Location: Wales
|
Posted: Fri Mar 27, 2009 11:48 pm Post subject: |
|
|
well thanks for the help I explored around and specifically...
when you create a table through the wizard (which I don't because we don't at school) if you double-click it in the tables menu it can be edited and the 1st row appears WITH TEXTBOXES. However, if I make one in the much more simple and less limiting design view it's as if some error occured and the first row was not created. My Dad has been not much good though he tried, because he doesn't use base (even though he used to be a domain database server admin ) _________________ NOOB BUT PRO |
|
| Back to top |
|
 |
r4zoli Super User

Joined: 17 May 2005 Posts: 570 Location: Budapest, Hungary
|
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2474 Location: 3rd Rock From The Sun
|
Posted: Sat Mar 28, 2009 8:07 am Post subject: |
|
|
MMA-Jon:
You said: | MMA-Jon wrote: | | However, if I make one in the much more simple and less limiting design view it's as if some error occured and the first row was not created. |
I do not understand what you mean, BUT, I have included additional 'screen prints' to show how things should look, to create / modify a Table Definition.
To start, after openning your .odb file, click on the Tables Icon followed by Create Table in Design View...
Enter the name of the field ( column ) you want to create ( below, I choose / entered the Field Name of ID ), and assign a Field Type as well as any specific field information.
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to add [Solved] in your first post title (edit button) if your issue has been fixed / resolved. |
|
| Back to top |
|
 |
MMA-Jon General User

Joined: 07 Mar 2009 Posts: 11 Location: Wales
|
Posted: Sat Mar 28, 2009 10:03 am Post subject: |
|
|
| r4zoli wrote: | | Your table has a primary key? |
Oops sorry missed that one no, I do not use primary keys because they are small databases I make for myself for Data Source reference in Writer. There seems no point in sorting the records. (Unless I misunderstood my IT teacher when he defined the primary key, afaik it creates an ID field but it might not be right.
And specifically sliderule, I mean when you open a table created through design view, I get a blank page with only the field names at the top. go to record ___ is greyed out and so are the navigation keys. Where there would be a bar to enter your first record there is an empty space. If this doesn't describe it well enough I may need some noob help:
I forgot where screen prints are saved!!! _________________ NOOB BUT PRO |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2474 Location: 3rd Rock From The Sun
|
Posted: Sat Mar 28, 2009 11:10 am Post subject: |
|
|
MMA-Jon:
Yes, in order to be able to change database content, a PRIMARY KEY is required.
According to Base Help File - primary key;database tables :
| OpenOffice Help: primary key;database tables wrote: | Table Design
This section contains information about how to create a new database table in the design view.
Open the database file of the database where you want a new table. Click the Tables icon. Choose Create Table in Design View to create a new table.
In the Design view, you can now create the fields for your table.
Enter new fields in rows from top to bottom. Click the Field Name cell and enter a field name for each data field.
Include a "primary key" data field. Base needs a primary key to be able to edit the table contents. A primary key has unique contents for each data record. For example, insert a numerical field, right-click the first column, and choose Primary Key from the context menu. Set AutoValue to "Yes", so Base can automatically increment the value for each new record.
In the next cell to the right, define the Field Type. When you click in the cell, you can select a field type in the combo box.
Each field can only accept data corresponding to the specified field type. For example, it is not possible to enter text in a number field. Memo fields in dBASE III format are references to internally-managed text files which can hold up to 64KB text.
|
Please note . . . a Primary Key is what makes an entry UNIQUE. That is, a Primary Key may be:- an AutoValue
- one field
- a combination of more than one fields
. . . so it is UNIQUE. ( unique means, it will NOT allow duplication of a primary key field(s) ).
Let me give you an example, if you wanted a LIST of all the countries in the world . . . the COUNTRY could make up a Primary Key ( assuming, no country name is duplicated ). If you had a list of cities in the world . . . since . . . there is a London in UK AND in Canada, by combining Country and City to make a Primary Key ( unique ) could work.
According to Wikipedia http://en.wikipedia.org/wiki/Primary_key :
| http://en.wikipedia.org/wiki/Primary_key wrote: | In relational database design, a unique key or primary key is a candidate key to uniquely identify each row in a table. A unique key or primary key comprises a single column or set of columns. No two distinct rows in a table can have the same value (or combination of values) in those columns. Depending on its design, a table may have arbitrarily many unique keys but at most one primary key.
A unique key must uniquely identify all possible rows that exist in a table and not only the currently existing rows. Examples of unique keys are Social Security numbers (associated with a specific person[1]) or ISBNs (associated with a specific book). Telephone books and dictionaries cannot use names or words or Dewey Decimal system numbers as candidate keys because they do not uniquely identify telephone numbers or words. |
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to add [Solved] in your first post title (edit button) if your issue has been fixed / resolved. |
|
| Back to top |
|
 |
MMA-Jon General User

Joined: 07 Mar 2009 Posts: 11 Location: Wales
|
Posted: Sat Mar 28, 2009 11:14 am Post subject: |
|
|
thank you so much and sorry for being a bit nooby, it works perfectly. Of course this was a wild goose chase all along doh doh doh I am used to working with Access 2000/03 which does not require a key. _________________ NOOB BUT PRO |
|
| Back to top |
|
 |
MMA-Jon General User

Joined: 07 Mar 2009 Posts: 11 Location: Wales
|
Posted: Sat Mar 28, 2009 11:31 am Post subject: |
|
|
hmm, not on my original topic but when I added an 'ID' field to put the prim. key in I go this error when I tried to save:
Error while saving the table design
Column Constraints are not acceptable in the statement [ALTER TABLE "Table Name" add "ID" VARCHAR(50) NOT NULL]
errr, what the f does that mean >_< _________________ NOOB BUT PRO |
|
| Back to top |
|
 |
Sliderule Super User


Joined: 29 May 2004 Posts: 2474 Location: 3rd Rock From The Sun
|
Posted: Sat Mar 28, 2009 12:16 pm Post subject: |
|
|
MMA-Jon
Your error statement says: | MMA-Jon wrote: | | ALTER TABLE "Table Name" add "ID" VARCHAR(50) NOT NULL |
The answer is . . . the ID field . . . you wanted the table to 'automatically' assign a NUMBER to the field . . . IT MUST BE DEFINED as either:- Integer
- BigInt
So, change the FIELD TYPE to either of the two above. Also, change to AutoNumber below . . . so the database knows you want / require this field ( ID ) to be numbered 'automatically'.
I hope this helps, please be sure to let me / us know.
Sliderule |
|
| Back to top |
|
 |
MMA-Jon General User

Joined: 07 Mar 2009 Posts: 11 Location: Wales
|
Posted: Sat Mar 28, 2009 12:20 pm Post subject: |
|
|
ok found that, I had a feeling there would be an AutoNumber around somwhere, now I get a partly new error:
ALTER TABLE "Table Name" add "ID" NOT NULL IDENTITY _________________ NOOB BUT PRO |
|
| Back to top |
|
 |
|