swami swami

swami swami

  • NA
  • 29
  • 5.1k

pass value to query

May 14 2013 1:24 PM
How to pass value of string to a query?
Following is the code - 

public string _advis
        {
            set { string ad1 = value; }
        }

MySqlCommand com1 = new MySqlCommand("Select ID from swapnali.login where Advisor_Name='"_advis "'", conn); 

How to pass value of _advis to mysql query. Here I have passed _advis, but it is giving error.

Thanks


Answers (7)