Error when adding user

Hi, I’m having an error when trying to add a user manually, I attached the error Log, Thanks in advance for your help

ERROR WHEN ADDING USER.zip (2,7 KB)

Some have recommended removing the column that is causing this. However, it could cause issues with later db migrations if the SambaPOS dev team tries to remove a column that doesn’t exist.

What I recommend is changing the column to allow nulls. So give this a try. If it doesn’t work we can try setting a default constraint instead.

SQL if you want to modify directly in SSMS:

BEGIN TRANSACTION;
BEGIN TRY

  ALTER TABLE dbo.Users ALTER COLUMN SevenShiftsEmployeeId INT NULL;

  COMMIT TRANSACTION;
END TRY
BEGIN CATCH
  IF @@TRANCOUNT > 0
    BEGIN
      ROLLBACK TRANSACTION;
    END;
END CATCH;

Database tool file if you want to execute it within SambaPOS management:
[CBL]Alter_Users_Table_Null_SevenShiftsId.zip (375 Bytes)

4 Likes

It is safe to remove this column.

Thank you very much for your fast reply, it worked!

2 Likes

where am i supposed to do that?

1 Like

works perfect to add the users thank you