How to Query the Database via ASP.NET

How to Query the Database via ASP.NET

Hi,
 
We have a website which users login using their AD accounts. Upon im plementation of the ADSelfService Plus software, we'd like to query the database to make sure the user has already provided their password questions/answers.
 
How can we access the database via our website to query the database and check to see if the user has provided such information described above (so that we can then redirect them to update such information)?
 
 
FYI: We will be implementing this in C#, but any VB example can be provided and we will translate it as appropriate.
 
Thank you.
 

                  New to ADSelfService Plus?