Take a look at the following for fetching info directly from the DB
edit
The above is for setting a value in the DB (which one shouldn’t really do). The following is for fetching from the DB
https://www.epiusers.help/t/simple-one-liner-c-to-retrieve-data-from-a-table/44627/2?u=ckrusen