I have a program which is updating a table in sqlserver, I have a form which I want to show the progress of this, the progress bar is incrementing but this is not being displaye
Short answer, yes. If you do it from the main thread you won't see the progress bar update.
Long answer:
Whenever you modify the user interface from a piece of your code that's translated into a "message" into the window message queue that will get that message and update the UI accordingly in the main thread.
However, since the main thread is busy handling your piece of code it doesn't have the "time" to actually update the user interface, and only when your process is done, it's free to update the user interface. That's why you see the progress bar going from 0% to 100% without any intermediate steps.
What you should do:
What you wanna do is put the work into a background worker, that way the main thread is free to attend UI update requests... that's, by the way, a standard practice if you wanna keep the UI responsive.