ASP.NET and SQL Server : update last record with dynamic values

I’m retrieving an HTTP response which I am deserializing the values into an Azure SQL database. I cannot find any way to format the SQL command to UPDATE string variables into the last record of the table. The intent is to overwrite the last record with each new token to avoid database maintenance requirements. I can statically write a value as in the example below, but I need it to be dynamically passed by variable which seems to throw off the syntax or command execution for some reason. No errors or exceptions are thrown – it just doesn’t do anything.

How can I connect a SQL database to a webhosted site with IIS on the web?

I am building a test web application in asp.net core and I have hosted my site from laptop. Everything seems good but when I go to access any database related page the page just loads for a bit until it gives me an error and prompts me to go developer mode to see more relevant information(which I can’t because the site is not on localhost it is on the web). I tried to change my connection string to different iterations it did not work, the site works locally with IIS express. Frankly I do not know what to do the documentation seems to be not existent so I would appreciate your help. You can test the website at http://digital60.ddnsking.com/.

Foreach loop not looping through checkbox list asp .net

I am trying to read a list of values that exist in a SQL database and if the value exists, it needs to check a checkbox in a checkbox list. At the moment, I can read the values of a specific employee but when I try to loop through the checkbox list, it skips it completely. I can add a new data entry by checking items perfectly but it’s only reading that is causing issues: