Samba crashes when trying to settle open tickets

Thank you for your help, @JTRTech.

No, the entity allocated to the problem ticket is NOT in the entity list.

The problem is that I did mess with Entity Type, but I don’t even remember what it was. I hoped that was just a small issue that I overlooked. It looks like I might have to dig deep.

Under ticket type you need to reassign the original entity type that entity belonged too.

You probably renamed it and it needs to be relinked to the ticket type

The ticket’s Entity Type is blank (nothing is written in that box). I don’t know how to re-assign it to another ticket type.

Can you pm me a copy of your database?

3 Likes

PM sent. Thank you for taking a look at it.

1 Like

I am going to recommend you stop using CE and try either LocalDB SQL Express or install SQL Express 2014 and convert your database to SQL. CE is limited and frankly slower and underpowered compared to SQL.

PS. I am still looking. It is because of the Entity but I am converting your database to SQL so I can look at it in MSSMS to see whats going on.

Great tutorial for converting it to SQL express 2014

Scroll down in the tutorial for instructions on converting the SDF file.

1 Like

Well apparently you changed the Entity to ... it was originally Lost Hermanos… changing it back did not fix it so there is more links missing I am still looking.

Ok its the Entity Type ID is not matching you must have deleted the Entity Type or did something to it. It originally was 1 now its 5. But that Ticket the entity assigned still thinks the Type is 1. I am looking how to fix it.

Essentially you messed up the database relation for that Entity to the Entity Type.

Kinda strange dont think ive seen this before. I wasnt even sure it was possible lol.

Throwing out a guess here, but you cannot delete an Entity nor an Account if it has been used in a Ticket Transaction. SambaPOS prevents you from doing this. If you manually deleted something from the DB using a query, then I could see how this issue would arise.

Also, renaming an Entity or Account (or pretty much anything for that matter) should have almost no effect, since the Transactions are based on IDs, not names.

Did you delete a Document Type?

Well he definitely renamed the Entity to ... How it let him do that with a ticket assigned I have no clue.

Although It looks like it will let you do that…

There are no documents linked its not paid yet…

Yes, that is what I am saying. Renaming an Entity (or Entity Type) is allowed - it should have no effect. Perhaps the fact that the Entity Name is . . . it is throwing things off.

@Jesse, are you looking in the [TicketEntities] table for this Ticket?

I changed it back and its still crashing so its not that. The fact that the Change Entity button is not showing makes me think its something to do with the Entity Type.

Yes I am lookiing at all the tables involving this ticket trying to piece it together.

The Entity ID is 5… that Entity was ... but the ticket it says Lost Hermanos… so it was previously Lost Hermanos at one point… I changed it back and had no effect.

EDIT: Maybe I am looking at wrong thing. Will look a little deeper at accounts etc.

Look at the Ticket Type as well. I am not certain from the error Report that this has anything to do with Entities.

1 Like

You know what… thats it… the Ticket Type id was 1. He only has a ticket type with id of 2 I am not sure how that got changed with a ticket assigned.

Apparently right after this ticket was made you switched ticket types somehow. This was last ticket with Ticket Type id of 1

How in the world did it let him delete the ticket type.

I am not sure how to fix that other than editing the database. It definitely had Ticket Type ID of 1 and that changed to 2 so somehow the TicketType changed or got deleted that used to be 1.

Hmm…maybe this is what happened:
The original Ticket Type ID 1 was named “Ticket”.
Then I created Ticket Type ID 2, and named it “Ticket 2”.
Then I deleted Ticket Type ID1, but I renamed the “Ticket 2” to “Ticket”.

Does that make sense?

Did you delete it manually from the db?

Strange that it would let him delete a Ticket Type that was in use.

To fix it just run an update like:

UPDATE [Tickets] SET [TicketTypeId]=2 WHERE [TicketTypeId]=1
1 Like

I manually deleted something. This is my blunder. I’ll just start over another database. I’ll also use the SQL Express this time to see if it reduces the lag time in Samba.

That fixed it. So now I am curious how it let you change that?

DO NOT delete anything manually that will wreck your system. You do not have to start over… just convert it to SQL like I showed you in the tutorial and then run that update q just listed… it works.

I will pm you your DB script just install SQL Express 2014 and create a blank database and then run this script in it.

It will definitely reduce the lag. SQL CE is very slow compared to SQL EXPRESS, especially if the tables are getting large.