It depends on the interface provided by the reader. To get started, take a look:
http://en.wikipedia.org/wiki/Barcode_reader[
^].
Chances are, you can face with so called "keyboard wedge", when the scanner simply plays the role of a keyboard. In this case, you simply need to capture key presses and assemble the text out of them. How to do it? It depends on your application type or UI library you use; and you did not bother to share with us this information.
As to the database… have you ever heard of separation of concerns? This is a totally separate aspect. Brief answer would be: use ADO.NET? Any concerns about it? :-)
—SA