Jump to content
bazzer747

Table Update Freezing

Recommended Posts

Hi,

I'm trying to do a MSSQL UPDATE on a table, but when I run this command the application freezes:

fdc.ExecSQL('UPDATE tPGCMatches SET Completed = :pC, Result = :pR, Score = :pSc WHERE ID = :pM',[ 1, cResult, cScore, gviMatchID ]);

fdc is the Firedac Connection to the MSSQL Server.

This also happens if I do a Edit/Post on the table, instead.

 

It feels like the table is locked and the command is waiting for access, but I'm 100% certain nothing else is using the table.

 

Just wondering if there is some FireDAC parameter set somewhere for this table that is preventing access. Any thoughts would be welcome.

Share this post


Link to post

I've put at Start Transaction, TRY .... Commit structure around this single MSSQL Update statement and it runs OK now. I don't normally use transaction structures unless I have more than one SQL statement happening in a process, but, well, this solves the problem, without knowing why.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×