Hi Waghmare,
From the captured image you need to get the byte data and and save in database in binary format.
In the above article below line is saving bytes as file.
File.WriteAllBytes(Server.MapPath(imagePath), ConvertHexToBytes(hexString));
Instead you can get the bytes using the below code.
byte[] bytes = ConvertHexToBytes(hexString);
Then save in database. Refer below article for saving byte data in database.