| View previous topic :: View next topic |
| Author |
Message |
Don Rumata General User

Joined: 18 May 2006 Posts: 15 Location: Sweden
|
Posted: Thu Aug 21, 2008 6:50 am Post subject: add data to table with UNIQUE Index / MySQL-Base SOLVED |
|
|
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 |
|
 |
MikeAndTom General User

Joined: 13 May 2008 Posts: 23
|
Posted: Thu Aug 21, 2008 8:36 am Post subject: |
|
|
| 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 |
|
 |
Don Rumata General User

Joined: 18 May 2006 Posts: 15 Location: Sweden
|
Posted: Sat Aug 23, 2008 5:16 am Post subject: |
|
|
thanks for your post. So at least I am not alone with my problem  |
|
| Back to top |
|
 |
Don Rumata General User

Joined: 18 May 2006 Posts: 15 Location: Sweden
|
Posted: Wed Aug 27, 2008 1:02 am Post subject: table with UNIQUE Index / MySQL-Base [SOLVED] |
|
|
| 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 |
|
 |
MikeAndTom General User

Joined: 13 May 2008 Posts: 23
|
Posted: Sun Sep 14, 2008 3:46 pm Post subject: |
|
|
Yeah that fixed it for me too.
Thanks for posting your answer Don  |
|
| Back to top |
|
 |
|