saeed_s261 0 Newbie Poster
SqlConnection con = new SqlConnection(connection string);
 SqlCommand cmd = new SqlCommand("select bookfile from books where bookfile='....' " , con);
                            con.Open();
                            SqlDataReader dr = cmd.ExecuteReader();
                            if (dr.HasRows)
                                {
                                   // Is Exist 
                                }

this code is for check whether a book file is exist in database?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.