can you show us the entire block of code making the call to the database?
do you have all the necessary libraries in your "using" statements at the top ?

using System.Data;
using System.Data.SqlClient;
etc...

hth,
mcm