Please see my comment to the question. If this is ASP.NET, why not? Of course it would be quite possible. Short answer is: use ADO.NET. This is a very nice introductory article which can help you to get started quickly:
Using ADO.NET for beginners[
^].
If PHP, also, why not? But this would be another question…
—SA