Author: billy_111 | Posted on: 11/6/2009 9:18:22 AM | Views : 465

Hey,
I am trying to check to see if a row in my database is empty, if so do something..
See the code below:-
///////////////////// L E F T //////////////////////////////

string connStr = "Data Source=tcp:esql2k801.discountasp.net;Initial Catalog=SQL2008_673062_kids;User ID=SQL2008_673062_kids_user;Password=*******;";
SqlConnection dbConn = new SqlConnection(connStr);

string sqlStr = "SELECT page_id, main_id, breadcrumb, header_image, main_title, body_text, tab_1, tab_1_info, tab_2, tab_2_info, tab_3, tab_3_info, tab_4, tab_4_info, right_image " +
"FROM tbl_tabbed_pages WHERE page_id = 3";

dbConn.Open();
SqlCommand dbCommand = new SqlCommand(sqlStr, dbConn);

SqlDataReader dbReader = dbCommand.ExecuteReader();

while (dbReader.Read())
{
...

Go to the complete details ...