0

hello everyone!!
i m new to c# and making project on c# window application.I learned a lot from daniweb but now i m stuck in one thing help me to resolve the problem.
database table lib_book_details in which column are tag_id,book_name,author_name.
Now i want to make a search form in which i add tag_id in textbox and the rest data appears as per my search.
Thanks in advance..

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by divin757
0

This is a copy pasta from an ASP project im working on let me know if its helpful or not.

public static void OrderDetails(GridView gv, int orderID)
    {
        using (SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings[sConnNorth].ConnectionString))
        {
            conn.Open();
            using (SqlCommand comm = new SqlCommand("OrderDetails", conn))
            {
                comm.CommandType = CommandType.StoredProcedure;

                SqlParameter param = new SqlParameter("@orderID", orderID);
                param.Direction = ParameterDirection.Input;
                param.SqlDbType = SqlDbType.Int;
                comm.Parameters.Add(param);

                gv.DataSource = comm.ExecuteReader();
                gv.DataBind();
            }
            conn.Close();
        }
    }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.