OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[SOLVED] Problem editing table

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
shorty123
General User
General User


Joined: 06 Apr 2010
Posts: 11

PostPosted: Tue Apr 06, 2010 8:26 pm    Post subject: [SOLVED] Problem editing table Reply with quote

I created a database table by dragging the Calc table (which contained the data) into the Tables pane (for the Open Office Database).

The problem I have right now is that I am unable to edit the data in the table. The Edit->Edit Data menu item is grayed out. If I create a table using the Create Tables Wizard, the Edit->Edit Data menu item is not grayed out.

Any advice on what I need to do in order to ungray out the Edit Data menu item? Any advice would be much appreciated.


Last edited by shorty123 on Wed Apr 07, 2010 12:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
BigAndy
OOo Enthusiast
OOo Enthusiast


Joined: 03 Jan 2010
Posts: 150

PostPosted: Tue Apr 06, 2010 9:08 pm    Post subject: Re: Problem editing table Reply with quote

shorty123 wrote:
I created a database table by dragging the Calc table (which ...
Any advice on what I need to do in order to ungray out the Edit Data menu item? Any advice would be much appreciated.


Try to create unique or some other index on target table
Back to top
View user's profile Send private message
shorty123
General User
General User


Joined: 06 Apr 2010
Posts: 11

PostPosted: Tue Apr 06, 2010 9:10 pm    Post subject: Re: Problem editing table Reply with quote

BigAndy wrote:
shorty123 wrote:
I created a database table by dragging the Calc table (which ...
Any advice on what I need to do in order to ungray out the Edit Data menu item? Any advice would be much appreciated.


Try to create unique or some other index on target table

In the target table, the first column (ID) should be used as the primary key field. How do I configure the table so that it knows that the ID field should be the primary key field?
Back to top
View user's profile Send private message
BigAndy
OOo Enthusiast
OOo Enthusiast


Joined: 03 Jan 2010
Posts: 150

PostPosted: Tue Apr 06, 2010 9:33 pm    Post subject: Re: Problem editing table Reply with quote

shorty123 wrote:
BigAndy wrote:
shorty123 wrote:
I created a database table by dragging the Calc table (which ...
Any advice on what I need to do in order to ungray out the Edit Data menu item? Any advice would be much appreciated.


Try to create unique or some other index on target table

In the target table, the first column (ID) should be used as the primary key field. How do I configure the table so that it knows that the ID field should be the primary key field?

Use DDL create [unique] index or alter table .. alter column [primary key] statements
http://hsqldb.org/doc/2.0/guide/ch04.html#N1127E
http://hsqldb.org/doc/2.0/guide/ch04.html#N10C5E
Back to top
View user's profile Send private message
shorty123
General User
General User


Joined: 06 Apr 2010
Posts: 11

PostPosted: Wed Apr 07, 2010 10:10 am    Post subject: Re: Problem editing table Reply with quote

BigAndy wrote:
shorty123 wrote:
BigAndy wrote:
shorty123 wrote:
I created a database table by dragging the Calc table (which ...
Any advice on what I need to do in order to ungray out the Edit Data menu item? Any advice would be much appreciated.


Try to create unique or some other index on target table

In the target table, the first column (ID) should be used as the primary key field. How do I configure the table so that it knows that the ID field should be the primary key field?

Use DDL create [unique] index or alter table .. alter column [primary key] statements
http://hsqldb.org/doc/2.0/guide/ch04.html#N1127E
http://hsqldb.org/doc/2.0/guide/ch04.html#N10C5E


In the Table Design screen, I setup the ID field to be a primary key and then set AutoValue to Yes. When I tried to save the table design, I got the following error:
"Column "ID" could not be changed. Should the column instead be deleted and the new format appended?"

When I selected "No", I got this error:

"Constraint not foundtable has no primary key in statement [ALTER TABLE "Member Complete 2" DROP PRIMARY KEY]

What am I doing wrong? Thanks for your help.

Note: The table which I am reproducing from the access database has an ID field (with values) which I want to keep on using as the primary field in Open Office Base.
Back to top
View user's profile Send private message
BigAndy
OOo Enthusiast
OOo Enthusiast


Joined: 03 Jan 2010
Posts: 150

PostPosted: Wed Apr 07, 2010 11:31 am    Post subject: Re: Problem editing table Reply with quote

[quote="shorty123"][quote="BigAndy"][quote="shorty123"]
BigAndy wrote:
What am I doing wrong? Thanks for your help.

Instead creating primary or other key you tried make an autoincrement field but not index/primary key. Autoincrement and keyfield and theremore indexes are generally separate notions.
Quote:

Note: The table which I am reproducing from the access database has an ID field (with values) which I want to keep on using as the primary field in Open Office Base.

If you want create identity you should use alter table.alter column statement. Complete manual is here http://hsqldb.org/doc/guide/ch02.html#N104AE
If ypu want create Primary key or index, you should use manuals from my previous post.

Do not try create primary key onto column[s] which contains even one repeatable value, you should get described error.

PS
Quote:
In the Table Design screen,

Do not use any design . Use directly DDL | DML
Back to top
View user's profile Send private message
shorty123
General User
General User


Joined: 06 Apr 2010
Posts: 11

PostPosted: Wed Apr 07, 2010 12:07 pm    Post subject: Re: Problem editing table Reply with quote

[quote="BigAndy"][quote="shorty123"][quote="BigAndy"]
shorty123 wrote:
BigAndy wrote:
What am I doing wrong? Thanks for your help.

Instead creating primary or other key you tried make an autoincrement field but not index/primary key. Autoincrement and keyfield and theremore indexes are generally separate notions.
Quote:

Note: The table which I am reproducing from the access database has an ID field (with values) which I want to keep on using as the primary field in Open Office Base.

If you want create identity you should use alter table.alter column statement. Complete manual is here http://hsqldb.org/doc/guide/ch02.html#N104AE
If ypu want create Primary key or index, you should use manuals from my previous post.

Do not try create primary key onto column[s] which contains even one repeatable value, you should get described error.

PS
Quote:
In the Table Design screen,

Do not use any design . Use directly DDL | DML

Thanks for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group