NetTalk Central

Author Topic: Insert user Autoincrement Error  (Read 1881 times)

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Insert user Autoincrement Error
« on: March 02, 2016, 11:24:40 PM »
Hi!

I'm testing C8 WebServer NT9.06 application with Secwin  6.36 and MySQL including Security File in it and inserting me with two different e-mail accounts with the same name/surname. Ok, I'm forcing an error but application gets weird.

When trying to add second user: it pops a message at Server side with an Autoincrement Error in key ope:IDKey and blocking client side.

In Clarion Dictionary we have a table secwin_operators (Memory) with a key ope:KeyID that is set as unique and autoincrement.on a Int field ID, ok. There is another key ope:Key that is composed of SiteLimiter, Surname and FirstName as unique. It's ok too.

But in the MySQL side on a set of Secwin Security Files created we have a table secwint_operators5 with a key ope5_IDKey.composed of SiteLimiter, Surname and FirstName as INDEX. Shouldn't be an UNIQUE index?

So I try changing that key as UNIQUE that prevents from Autoincrement Error but with the following side effects:

- Insering operator same name and surname says that "This user could not be added", but in client side operator browser appears with Number = 0.
- Trying to change this user it's showed in form. Seems that this record is in memory table. Press Save "Invalid user Error adding user".
- Trying to delete gives an error "Invalid user: Error adding user".
- Memory table don't allows this because of key ds_ope:Key (SiteLimiter, Surname, FirstName), Unique, exclude empty should prevent this.
- After session timeout login with a valid user gives me error. Trying again ok.

 At the end the user was added to a MySQL table and any attempt to login gives me Login Fail. I have to delete the second user directly in MySQL to get to normal.

Is there a way to prevent this without hand code?

Thank you.