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

add data to table with UNIQUE Index / MySQL-Base SOLVED

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


Joined: 18 May 2006
Posts: 15
Location: Sweden

PostPosted: Thu Aug 21, 2008 6:50 am    Post subject: add data to table with UNIQUE Index / MySQL-Base SOLVED Reply with quote

Hi!

I am using a MySQL base connection via ODBC, working smoothly. I have a table with a normal integer primary key on AUTOVALUE. I am using this table in many forms as a main form, linked to different subforms. I use these forms to both add and modify data in the main and subforms.

Now I have added a UNIQUE index for another field in the main table, in addition to the primary key. I did this with MySQL Administrator. After that, I was able to add data directly in MySQL Administrator, and when I tried to enter a duplicate in the UNIQUE field, I got an error message - exactly what I wanted! I need this field to be unique without duplicates.

Now I was trying to use the base forms again as mentioned above, but the main table no longer allows for adding or modifying data, neither in the forms nor directly in the table. Obviously, base has problems with the UNIIQUE index in MySQL and puts the entire table on a read-only.

Can anybody explain to me why this is the case and how I could solve this problem?

Many thanks in advance!


Last edited by Don Rumata on Wed Aug 27, 2008 1:03 am; edited 1 time in total
Back to top
View user's profile Send private message
MikeAndTom
General User
General User


Joined: 13 May 2008
Posts: 23

PostPosted: Thu Aug 21, 2008 8:36 am    Post subject: Reply with quote

I am having the same issue right now as well. Adding unique indexing to the MySQL table design seems to "lock out" the form and disallow any editing of data.
Back to top
View user's profile Send private message
Don Rumata
General User
General User


Joined: 18 May 2006
Posts: 15
Location: Sweden

PostPosted: Sat Aug 23, 2008 5:16 am    Post subject: Reply with quote

thanks for your post. So at least I am not alone with my problem Wink
Back to top
View user's profile Send private message
Don Rumata
General User
General User


Joined: 18 May 2006
Posts: 15
Location: Sweden

PostPosted: Wed Aug 27, 2008 1:02 am    Post subject: table with UNIQUE Index / MySQL-Base [SOLVED] Reply with quote

I think I got it. I had the unique index on default. If you use btree for index type, base interprets the index correctly and the table is unlocked!
Back to top
View user's profile Send private message
MikeAndTom
General User
General User


Joined: 13 May 2008
Posts: 23

PostPosted: Sun Sep 14, 2008 3:46 pm    Post subject: Reply with quote

Yeah that fixed it for me too.

Thanks for posting your answer Don Smile
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